Browse Source

on_network_update: check if channel is closed

master
ThomasV 7 years ago
parent
commit
3dacc525e6
  1. 2
      electrum/lnworker.py

2
electrum/lnworker.py

@ -577,6 +577,8 @@ class LNWallet(LNWorker):
if args[0] != lnwatcher: if args[0] != lnwatcher:
return return
for chan in channels: for chan in channels:
if chan.is_closed():
continue
if chan.get_state() in ["OPEN", "DISCONNECTED"] and self.is_dangerous(chan): if chan.get_state() in ["OPEN", "DISCONNECTED"] and self.is_dangerous(chan):
await self.force_close_channel(chan.channel_id) await self.force_close_channel(chan.channel_id)
continue continue

Loading…
Cancel
Save