From 6f246b90bfc24c534d21aee8ccec8aa69cefbd39 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 5 Jun 2018 17:31:07 +0200 Subject: [PATCH] wait for peer.initialized in channel_establishment_flow --- lib/lnbase.py | 1 + lib/lnworker.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/lnbase.py b/lib/lnbase.py index 6663c43ee..855d4ddfc 100644 --- a/lib/lnbase.py +++ b/lib/lnbase.py @@ -781,6 +781,7 @@ class Peer(PrintError): self.writer.close() async def channel_establishment_flow(self, wallet, config, password, funding_sat, push_msat, temp_channel_id): + await self.initialized # see lnd/keychain/derivation.go keyfamilymultisig = 0 keyfamilyrevocationbase = 1 diff --git a/lib/lnworker.py b/lib/lnworker.py index 1ff54b626..92967f634 100644 --- a/lib/lnworker.py +++ b/lib/lnworker.py @@ -180,6 +180,7 @@ class LNWorker(PrintError): def open_channel(self, node_id, local_amt_sat, push_amt_sat, pw): coro = self._open_channel_coroutine(node_id, local_amt_sat, push_amt_sat, None if pw == "" else pw) + # FIXME this is blocking the GUI return asyncio.run_coroutine_threadsafe(coro, self.network.asyncio_loop).result() def pay(self, invoice):