Browse Source

lnworker: only reestablish channels after on-chain state is synchronized

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 5 years ago
committed by ThomasV
parent
commit
e32807d29d
  1. 3
      electrum/lnworker.py

3
electrum/lnworker.py

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

Loading…
Cancel
Save