]> git.bitcoin.ninja Git - rust-lightning/commit
List supported/required feature bits explicitly in ChannelManager
authorMatt Corallo <git@bluematt.me>
Mon, 12 Sep 2022 17:47:16 +0000 (17:47 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 14 Sep 2022 20:08:54 +0000 (20:08 +0000)
commit6b1f867eaaaf9b5fd4317aefa52ab183b7e5f980
treed5321571946ec86af6430962261814a03ca8d46b
parent58f76f2800ec8590ebc2261dac96e8a68de63b79
List supported/required feature bits explicitly in ChannelManager

Historically, LDK has considered the "set of known/supported
feature bits" to be an LDK-level thing. Increasingly this doesn't
make sense - different message handlers may provide or require
different feature sets.

In a previous PR, we began the process of transitioning with
feature bits sent to peers being sourced from the attached message
handler.

This commit makes further progress by moving the concept of which
feature bits are supported by our ChannelManager into
channelmanager.rs itself, via the new `provided_*_features`
methods, rather than in features.rs via the `known_channel_features`
and `known` methods.
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/features.rs
lightning/src/ln/peer_handler.rs
lightning/src/util/test_utils.rs