Browse Source

lnwatcher: use is_mine(addr) instead of (addr in get_addresses())

small performance gain
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
d1fc4399e6
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/lnwatcher.py

2
electrum/lnwatcher.py

@ -217,7 +217,7 @@ class LNWatcher(AddressSynchronizer):
self.channel_status[outpoint] = 'closed (deep)'
tx = self.db.get_transaction(txid)
for i, o in enumerate(tx.outputs()):
if o.address not in self.get_addresses():
if not self.is_mine(o.address):
self.add_address(o.address)
elif n < 2:
r = self.inspect_tx_candidate(txid+':%d'%i, n+1)

Loading…
Cancel
Save