Ensure `get_claimable_balances` never panicks in tests
authorMatt Corallo <git@bluematt.me>
Fri, 25 Feb 2022 05:18:29 +0000 (05:18 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 1 Mar 2022 00:43:55 +0000 (00:43 +0000)
commited8f36520d7a5e8ba375719798906b884b483cc3
tree2a50fcf2428a5322be64ab4142753d9d0b494377
parentb1653f0705409087381975013593c86be7e4c5e3
Ensure `get_claimable_balances` never panicks in tests

... by calling it both before and after every chain event in
testing and fuzzing.

This requires fixing some blockchain inconsistencies in
`do_test_onchain_htlc_reorg`, `do_retry_with_no_persist`, and
`do_test_dup_htlc_onchain_fails_on_reload` where we'd connect
conflicting transactions in the same chain.
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/reorg_tests.rs