]> git.bitcoin.ninja Git - rust-lightning/commit
Claim HTLC output on-chain if preimage is recv'd after force-close
authorValentine Wallace <vwallace@protonmail.com>
Thu, 5 Nov 2020 21:37:24 +0000 (16:37 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 16 Nov 2020 20:41:31 +0000 (15:41 -0500)
commit6f1a0bf0e4088a1935bfcece06f479c26f825ee1
tree8ae63c15621452342edac44d8d50a89b1079312f
parente70f4850114694075200732df1bf541819add9a4
Claim HTLC output on-chain if preimage is recv'd after force-close

If we receive a preimage for an outgoing HTLC that solves an output on a
backwards force-closed channel, we need to claim the output on-chain.

Note that this commit also gets rid of the channel monitor redundantly setting
`self.counterparty_payment_script` in `check_spend_counterparty_transaction`.

Co-authored-by: Antoine Riard <ariard@student.42.fr>
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
lightning/src/chain/channelmonitor.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onchaintx.rs