lnworker: make sure to save new channel before we broadcast

see #6656
This commit is contained in:
SomberNight 2020-10-17 03:47:29 +02:00
parent c5da22a9dd
commit c3fb79d412
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -828,6 +828,7 @@ class LNWallet(LNWorker):
channels_db[chan.channel_id.hex()] = chan.storage channels_db[chan.channel_id.hex()] = chan.storage
for addr in chan.get_wallet_addresses_channel_might_want_reserved(): for addr in chan.get_wallet_addresses_channel_might_want_reserved():
self.wallet.set_reserved_state_of_address(addr, reserved=True) self.wallet.set_reserved_state_of_address(addr, reserved=True)
self.save_channel(chan)
self.wallet.save_backup() self.wallet.save_backup()
def mktx_for_open_channel(self, *, coins: Sequence[PartialTxInput], funding_sat: int, def mktx_for_open_channel(self, *, coins: Sequence[PartialTxInput], funding_sat: int,