Add a new NodeFeatures constructor to capture the types of flags
authorValentine Wallace <vwallace@protonmail.com>
Fri, 9 Sep 2022 16:17:33 +0000 (12:17 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 9 Sep 2022 19:58:24 +0000 (15:58 -0400)
commit7eee7974b0cf207e8d867c7ffaa9771c1e9d5822
tree508a89c59a60aee0875d79bf38360f114b03dff4
parentc106d4ff9f60a9225f662ab68cb054f416ce8361
Add a new NodeFeatures constructor to capture the types of flags

When ChannelMessageHandler implementations wish to return a NodeFeatures which
contain all the known flags that are relevant to channel handling, but not
gossip  handling, they currently need to do so by manually constructing a
NodeFeatures with all known flags and then clearing the ones they don't want.

Instead of spreading this logic across the codebase, this consolidates such
construction into one place in features.rs.
lightning/src/ln/channelmanager.rs
lightning/src/ln/features.rs
lightning/src/util/test_utils.rs