Browse Source

fix race between lnwatcher/lnworker

channels were sometimes not getting re-established
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
committed by ThomasV
parent
commit
72eb179c7a
  1. 5
      electrum/lnwatcher.py

5
electrum/lnwatcher.py

@ -93,7 +93,8 @@ class LNWatcher(PrintError):
e_tx2 = EncumberedTransaction.from_json(e_tx)
self.sweepstore[funding_outpoint][ctx_txid].add(e_tx2)
self.network.register_callback(self.on_network_update, ['network_updated', 'blockchain_updated', 'verified'])
self.network.register_callback(self.on_network_update,
['network_updated', 'blockchain_updated', 'verified', 'wallet_updated'])
def write_to_disk(self):
# FIXME: json => every update takes linear instead of constant disk write
@ -128,7 +129,7 @@ class LNWatcher(PrintError):
@aiosafe
async def on_network_update(self, event, *args):
if event == 'verified':
if event in ('verified', 'wallet_updated'):
wallet = args[0]
if wallet != self.addr_sync:
return

Loading…
Cancel
Save