Test register_output is called on dependent txn
authorJeffrey Czyz <jkczyz@gmail.com>
Sun, 21 Mar 2021 04:42:58 +0000 (00:42 -0400)
committerJeffrey Czyz <jkczyz@gmail.com>
Sat, 27 Mar 2021 22:21:05 +0000 (18:21 -0400)
commitd8d9eaf398f056a0ff61e0980a04a9e6dc438a00
treebde655268df99343eeaa27fed2f8415b4111e214
parent80e81fbea3a53fe88f056fc1761872e3eac5d13e
Test register_output is called on dependent txn

chain::Filter::register_output may return an in-block dependent
transaction that spends the output. Test the scenario where the txdata
given to ChainMonitor::block_connected includes a commitment transaction
whose HTLC output is spent in the same block but not included in txdata.
Instead, it is returned by chain::Filter::register_output when given the
commitment transaction's HTLC output. This is a common scenario for
Electrum clients, which provided filtered txdata.
lightning/src/chain/chainmonitor.rs
lightning/src/ln/functional_test_utils.rs