Make ChainWatchInterface::filter_block return only idxes, not refs
authorMatt Corallo <git@bluematt.me>
Sat, 13 Jun 2020 21:33:21 +0000 (17:33 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 23 Jun 2020 20:12:55 +0000 (16:12 -0400)
commit882db714deb1a6de349ac13ddf3cb3adf8bb8704
tree34eb29496804f8426a527123eeaff08036c3a723
parentee6dd7f1bb3e124f4ce583fb48ab640f3e47f881
Make ChainWatchInterface::filter_block return only idxes, not refs

Instead of making the filter_block fn in the ChainWatchInterface
trait return both a list of indexes of transaction positions within
the block and references to the transactions themselves, return
only the list of indexes and then build the reference list at the
callsite.

While this may be slightly less effecient from a memory locality
perspective, it shouldn't be materially different.

This should make it more practical to generate bindings for
filter_block as it no longer needs to reference Rust Transaction
objects that are contained in a Rust Block object (which we'd
otherwise just pass over the FFI in fully-serialized form).
fuzz/src/router.rs
lightning/src/chain/chaininterface.rs
lightning/src/util/test_utils.rs