Fetch our `InitFeatures` from `ChannelMessageHandler`
[rust-lightning] / lightning / src / ln / msgs.rs
index a810731c691f40c58a12272b2784a4dd48722245..fdcf5b05ff76e7191439d3738870275b3f932586 100644 (file)
@@ -902,6 +902,13 @@ pub trait ChannelMessageHandler : MessageSendEventsProvider {
        /// queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
        /// which are broadcasted in our node_announcement message.
        fn provided_node_features(&self) -> NodeFeatures;
+
+       /// Gets the init feature flags which should be sent to the given peer. All available handlers
+       /// are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+       /// which are sent in our [`Init`] message.
+       ///
+       /// Note that this method is called before [`Self::peer_connected`].
+       fn provided_init_features(&self, their_node_id: &PublicKey) -> InitFeatures;
 }
 
 /// A trait to describe an object which can receive routing messages.