Skip to content

Commit

Permalink
ignore missing edges when ignoring channels
Browse files Browse the repository at this point in the history
fixes #252
  • Loading branch information
C-Otto committed Jan 14, 2022
1 parent 9263d8d commit ab5c8f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lnd.py
Expand Up @@ -140,7 +140,7 @@ def get_route(
def get_edge(self, channel_id):
try:
return self.stub.GetChanInfo(ln.ChanInfoRequest(chan_id=channel_id))
except:
except Exception:
print(f"Unable to find channel edge {channel_id}")
raise

Expand Down
5 changes: 4 additions & 1 deletion routes.py
Expand Up @@ -129,7 +129,10 @@ def ignore_high_fee_hops(self, route):
self.ignore_hop_on_route(hop, route)

def ignore_channel(self, chan_id):
edge = self.lnd.get_edge(chan_id)
try:
edge = self.lnd.get_edge(chan_id)
except Exception:
return
self.ignore_edge_from_to(chan_id, edge.node1_pub, edge.node2_pub)
self.ignore_edge_from_to(chan_id, edge.node2_pub, edge.node1_pub)

Expand Down

0 comments on commit ab5c8f8

Please sign in to comment.