Send and handle `networks` field in `Init` messages
[rust-lightning] / lightning / src / ln / msgs.rs
index 0132497c6ade90a9ef99ce08bf8c3b3deb3a1a66..3dd4a6da70ccda8bde8a2e22f50db9c12e12d9cd 100644 (file)
@@ -1300,6 +1300,12 @@ pub trait ChannelMessageHandler : MessageSendEventsProvider {
        ///
        /// Note that this method is called before [`Self::peer_connected`].
        fn provided_init_features(&self, their_node_id: &PublicKey) -> InitFeatures;
+
+       /// Gets the genesis hashes for this `ChannelMessageHandler` indicating which chains it supports.
+       ///
+       /// If it's `None`, then no particular network chain hash compatibility will be enforced when
+       /// connecting to peers.
+       fn get_genesis_hashes(&self) -> Option<Vec<ChainHash>>;
 }
 
 /// A trait to describe an object which can receive routing messages.