commit 95b7c976e001e0ab16185e5b61c257906fe2ca18
parent 3fa1aed8cdc426ae4c929c5160e345e8826854ac
Author: SomberNight <somber.night@protonmail.com>
Date: Wed, 3 Mar 2021 14:10:57 +0100
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
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/electrum/lnrouter.py b/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: