1
0

Merge pull request #5825 from SomberNight/201912_local_tx_can_be_partial

wallet: allow saving partial tx as local (if it has a txid)
This commit is contained in:
ThomasV
2019-12-15 16:40:46 +01:00
committed by GitHub
5 changed files with 25 additions and 12 deletions

View File

@@ -832,6 +832,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)