ln channel open: save funding tx as local tx into wallet

This commit is contained in:
SomberNight 2019-12-08 04:33:36 +01:00
parent 30dcab0877
commit 5c9bd2d2b4
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -826,6 +826,8 @@ class LNWallet(LNWorker):
self.save_channel(chan)
self.lnwatcher.add_channel(chan.funding_outpoint.to_str(), chan.get_funding_address())
self.network.trigger_callback('channels_updated', self.wallet)
self.wallet.add_transaction(funding_tx) # save tx as local into the wallet
self.wallet.set_label(funding_tx.txid(), _('Open channel'))
if funding_tx.is_complete():
# TODO make more robust (timeout low? server returns error?)
await asyncio.wait_for(self.network.broadcast_transaction(funding_tx), LN_P2P_NETWORK_TIMEOUT)