]> git.bitcoin.ninja Git - rust-lightning/commit
Use sign_holder_htlc_transaction to sign non-anchors holder HTLCs
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Fri, 13 Oct 2023 20:52:23 +0000 (13:52 -0700)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Fri, 20 Oct 2023 22:32:13 +0000 (15:32 -0700)
commit03ec74631fcaf3cf8434432259d61571865820b0
tree32412e7491614ac3aeab0c02876df372fda4ce2c
parent5958604ea67b01ce69e4502bf2c35254838abab9
Use sign_holder_htlc_transaction to sign non-anchors holder HTLCs

We want to ensure we use fresh random signatures to prevent certain
classes of transaction replacement attacks at the bitcoin P2P layer.
This was already covered for commitment transactions and zero fee holder
HTLC transactions, but was missing for holder HTLC transactions on
non-anchors channels.

We can easily do this by reusing the existing
`EcdsaChannelSigner::sign_holder_htlc_transaction` method and
circumventing the existing `holder_htlc_sigs/prev_holder_htlc_sigs`
caches, which will be removed in a later commit anyway.
lightning/src/chain/onchaintx.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/monitor_tests.rs