1
0

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

small performance gain
This commit is contained in:
SomberNight
2020-02-18 17:16:46 +01:00
parent 72f4e83333
commit d1fc4399e6

View File

@@ -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)