Add test_htlc_no_detection
authorAntoine Riard <ariard@student.42.fr>
Tue, 6 Oct 2020 17:01:58 +0000 (13:01 -0400)
committerAntoine Riard <ariard@student.42.fr>
Sat, 10 Oct 2020 22:51:05 +0000 (18:51 -0400)
commit613ac6e5f09dc57013baeaa8592d4ff44ac7a35e
tree98175567537df98e8b7ac13b154ad946ffa32ecc
parent30aad79df8548d06fdd2270349fadf4afa07ee94
Add test_htlc_no_detection

This test is a mutation to underscore the detetection logic bug
we had before #653. HTLC value routed is above the remaining
balance, thus inverting HTLC and `to_remote` output. HTLC
will come second and it wouldn't be seen by pre-#653 detection
as we were eneumerate()'ing on a watched outputs vector (Vec<TxOut>)
thus implictly relying on outputs order detection for correct
spending children filtering.
lightning/src/ln/functional_tests.rs