wait for peer.initialized in channel_establishment_flow

This commit is contained in:
SomberNight 2018-06-05 17:31:07 +02:00 committed by ThomasV
parent 11c6fce7bf
commit 6f246b90bf
2 changed files with 2 additions and 0 deletions

View file

@ -781,6 +781,7 @@ class Peer(PrintError):
self.writer.close() self.writer.close()
async def channel_establishment_flow(self, wallet, config, password, funding_sat, push_msat, temp_channel_id): async def channel_establishment_flow(self, wallet, config, password, funding_sat, push_msat, temp_channel_id):
await self.initialized
# see lnd/keychain/derivation.go # see lnd/keychain/derivation.go
keyfamilymultisig = 0 keyfamilymultisig = 0
keyfamilyrevocationbase = 1 keyfamilyrevocationbase = 1

View file

@ -180,6 +180,7 @@ class LNWorker(PrintError):
def open_channel(self, node_id, local_amt_sat, push_amt_sat, pw): 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) 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() return asyncio.run_coroutine_threadsafe(coro, self.network.asyncio_loop).result()
def pay(self, invoice): def pay(self, invoice):