mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix race between lnwatcher/lnworker
channels were sometimes not getting re-established
This commit is contained in:
parent
8a14993f9b
commit
3e1862bb94
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue