commit d1fc4399e627fd1945db51f0dbd74ddafc695471
parent 72f4e833333d251d179984a707724e6ca51e3208
Author: SomberNight <somber.night@protonmail.com>
Date: Tue, 18 Feb 2020 17:16:46 +0100
lnwatcher: use is_mine(addr) instead of (addr in get_addresses())
small performance gain
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/electrum/lnwatcher.py b/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)