]> git.bitcoin.ninja Git - rust-lightning/commit
Add a new InitFeatures constructor to capture the types of flags
authorMatt Corallo <git@bluematt.me>
Wed, 7 Sep 2022 17:55:01 +0000 (17:55 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 9 Sep 2022 15:36:46 +0000 (15:36 +0000)
commite34a2bc722a998376576eb5f2e60bbafefaed7f4
tree559b81326aeb3fcacb6ed7ecaaa8f922094aa3a7
parent06cb48afd46c71b10dfd96bdac1c0f509605cf6b
Add a new InitFeatures constructor to capture the types of flags

When `ChannelMessageHandler` implementations wish to return an
`InitFeatures` 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 an InitFeatures with all known
flags and then clearing the ones they dont want.

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