Introduce traits to make test utils generic across the `CM` Holder
authorMatt Corallo <git@bluematt.me>
Fri, 17 Mar 2023 20:50:19 +0000 (20:50 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 13 Apr 2023 18:40:46 +0000 (18:40 +0000)
commitd55623601f9580a31a77cd3bbad2542aeae70233
tree016fb7d1d906beada0a7153075b2027d27e19ff0
parentfb86fc2744a5235c3e1b2d809d32b60be44c6200
Introduce traits to make test utils generic across the `CM` Holder

In our test utilities, we generally refer to a `Node` struct which
holds a `ChannelManager` and a number of other structs. However, we
use the same utilities in benchmarking, where we have a different
`Node`-like struct. This made moving from macros to functions
entirely impossible, as we end up needing multiple types in a given
context.

Thus, here, we take the pain and introduce some wrapper traits
which encapsulte what we need from `Node`, swapping some of our
macros to functions.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs