Browse Source

lnworker: handle null whitelist correctly

master
Janus 7 years ago committed by ThomasV
parent
commit
129099797a
  1. 2
      electrum/lnworker.py

2
electrum/lnworker.py

@ -200,7 +200,7 @@ class LNWorker(PrintError):
return {'settled': settled, 'unsettled': unsettled, 'inflight': inflight} return {'settled': settled, 'unsettled': unsettled, 'inflight': inflight}
def find_htlc_for_addr(self, addr, whitelist=None): def find_htlc_for_addr(self, addr, whitelist=None):
channels = [y for x,y in self.channels.items() if x in whitelist or whitelist is None] channels = [y for x,y in self.channels.items() if whitelist is None or x in whitelist]
for chan in channels: for chan in channels:
for htlc in chan.hm.log[LOCAL]['adds'].values(): for htlc in chan.hm.log[LOCAL]['adds'].values():
if htlc.payment_hash == addr.paymenthash: if htlc.payment_hash == addr.paymenthash:

Loading…
Cancel
Save