]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid commitment broadcast upon detected funding spend
authorWilmer Paulino <wilmer.paulino@gmail.com>
Thu, 25 Aug 2022 20:11:19 +0000 (13:11 -0700)
committerWilmer Paulino <wilmer.paulino@gmail.com>
Tue, 13 Sep 2022 17:58:20 +0000 (10:58 -0700)
commit62236c70d863bf9456e28a3a1ba784b2e4680a88
tree73906b02ec4e0e8c665dc73e0edb93525a828dbc
parent2f4a1f7f79e55d28b289f4907e019e66a251a19e
Avoid commitment broadcast upon detected funding spend

There's no need to broadcast our local commitment transaction if we've
already seen a confirmed one as it'll be immediately rejected as a
duplicate/conflict.

This will also help prevent dispatching spurious events for bumping
commitment and HTLC transactions through anchor outputs (once
implemented in future work) and the dispatch for said events follows the
same flow as our usual commitment broadcast.
lightning/src/chain/channelmonitor.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/payment_tests.rs