tlnworker: only reestablish channels after on-chain state is synchronized - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit e32807d29d0484b5bb834affc5fd163274991e13
DIR parent 944e4f0ba0b6bbfb64c802a2b80515b27ded6713
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 2 Aug 2019 18:58:38 +0200
lnworker: only reestablish channels after on-chain state is synchronized
Diffstat:
M electrum/lnworker.py | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py
t@@ -1045,6 +1045,9 @@ class LNWallet(LNWorker):
async def reestablish_peers_and_channels(self):
while True:
await asyncio.sleep(1)
+ # wait until on-chain state is synchronized
+ if not (self.wallet.is_up_to_date() and self.lnwatcher.is_up_to_date()):
+ continue
with self.lock:
channels = list(self.channels.values())
for chan in channels: