electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 72eb179c7a0cae032d44333a3098659551900796
parent d44afd96334f9d48dc0b28e0e6d24e416b17c18c
Author: SomberNight <somber.night@protonmail.com>
Date:   Fri,  5 Oct 2018 19:11:24 +0200

fix race between lnwatcher/lnworker

channels were sometimes not getting re-established

Diffstat:
Melectrum/lnwatcher.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/electrum/lnwatcher.py b/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