Browse Source

lnrouter.get_distances: fix exception due to rare race

if the graph is being updated while the pathfinding is running,
channel_info might be None here
patch-4
SomberNight 4 years ago
parent
commit
95b7c976e0
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/lnrouter.py

2
electrum/lnrouter.py

@ -275,6 +275,8 @@ class LNPathFinder(Logger):
continue
channel_info = self.channel_db.get_channel_info(
edge_channel_id, my_channels=my_channels, private_route_edges=private_route_edges)
if channel_info is None:
continue
edge_startnode = channel_info.node2_id if channel_info.node1_id == edge_endnode else channel_info.node1_id
is_mine = edge_channel_id in my_channels
if is_mine:

Loading…
Cancel
Save