Remove ChainWatchInterface from BlockNotifier
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 16 Jun 2020 22:10:17 +0000 (15:10 -0700)
committerJeffrey Czyz <jkczyz@gmail.com>
Thu, 24 Sep 2020 17:21:54 +0000 (10:21 -0700)
commita7b2eb6d98eafa84f0516c9ba8321a3f653a84bd
tree6355bdc8bc5356d89c40325f2ac55b84f1d6b4d2
parent864017368926a255dd60bc1af42a5b848b89e1b7
Remove ChainWatchInterface from BlockNotifier

ChainListeners should be independent of each other, but in practice this
is not the case because ChainWatchInterface introduces a dependency
between them. Push ChainWatchInterface down into the ChainListener
implementations where needed. Update ChainListener's block_connected
method to take a slice of the form &[(usize, &Transaction)] where each
transaction is paired with its position within the block.
13 files changed:
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning/src/chain/chaininterface.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/reorg_tests.rs
lightning/src/util/test_utils.rs