]> git.bitcoin.ninja Git - rust-lightning/commit
Fix force_shutdown() bug where we lose knowledge of a preimage
authorMatt Corallo <git@bluematt.me>
Thu, 26 Jul 2018 21:53:10 +0000 (17:53 -0400)
committerMatt Corallo <git@bluematt.me>
Sat, 28 Jul 2018 22:34:01 +0000 (18:34 -0400)
commit9aed28fbf0a42f8d623523761f6b1fb14fa6f87e
tree6f1eebc304024bdd9ff422455f31fc6a63d5523d
parent982317a4448cef14212ddeb34ae4e89e896cb9d7
Fix force_shutdown() bug where we lose knowledge of a preimage

In case we are in AwaitingRemoteRevoke and we go to claim an HTLC
(at which point we've already given up the money to the next hop in
the payment) we just write it to holding_cell_htlc_updates.
However, we should be ensuring we *also* write it to our
channel_monitor as we need to make sure we can still claim it after
a force_shutdown() or otherwise after hitting the chain.
src/ln/channel.rs
src/ln/channelmanager.rs