]> git.bitcoin.ninja Git - rust-lightning/commit
Track and react to remote partial-claiming of pending claim request
authorAntoine Riard <ariard@student.42.fr>
Mon, 9 Dec 2019 21:59:08 +0000 (16:59 -0500)
committerAntoine Riard <ariard@student.42.fr>
Tue, 10 Dec 2019 20:50:56 +0000 (15:50 -0500)
commitfeb472dc9ef971b926b19d27e1ad05a79423778f
treee846ec3a14bdfad13be2ff9f906c9b08d80e632f
parenta0373dc83e9d6a903df2f9feeb665290c49f4c44
Track and react to remote partial-claiming of pending claim request

A pending claim request may contain a set of multiple outpoints.
If one or multiple of them get claimed by remote party, our in-flight
claiming transactions aren't valid anymore so we need to react
quickly and regenerate claiming transaction with accurate set.

However, a claimed outpoint may be disconnected and we need to resurrect
back outpoint among set of orignal pending claim request.

To guarantee consistency of contentious claimed outpoint we cache it
as OnchainEvent::ContentionsOutpoint and only delete it after
ANTI_REORG_DELAY.

Fix test broken by change, partial claiming on revoked txn
force us to regenerate txn
fuzz/fuzz_targets/full_stack_target.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs