]> git.bitcoin.ninja Git - rust-lightning/commit
Fail channel if we can't sign a new commitment tx during HTLC claim 2021-06-fix-double-claim-close
authorMatt Corallo <git@bluematt.me>
Thu, 15 Jul 2021 22:26:51 +0000 (22:26 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 28 Jul 2021 00:34:53 +0000 (00:34 +0000)
commitf06f9d11365360dc2add96acd7916673ea9ce383
tree3774330f6d138e16247ead900d39581a6ead5e84
parentc09104f46ef5b44a1efb38669b95d21fa77d37ec
Fail channel if we can't sign a new commitment tx during HTLC claim

Previously, we could fail to generate a new commitment transaction
but it simply indicated we had gone to doule-claim an HTLC. Now
that double-claims are returned instead as Ok(None), we should
handle the error case and fail the channel, as the only way to hit
the error case is if key derivation failed or the user refused to
sign the new commitment transaction.

This also resolves an issue where we wouldn't inform our
ChannelMonitor of the new payment preimage in case we failed to
fetch a signature for the new commitment transaction.
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs