@@ -157,9 +157,7 @@ use lightning_background_processor::process_events_async;
157157pub use lightning_invoice;
158158pub use lightning_liquidity;
159159pub use lightning_types;
160- use lightning_types:: features:: {
161- Bolt11InvoiceFeatures , ChannelFeatures , InitFeatures , NodeFeatures ,
162- } ;
160+ use lightning_types:: features:: NodeFeatures ;
163161use liquidity:: { LSPS1Liquidity , LiquiditySource } ;
164162use lnurl_auth:: LnurlAuth ;
165163use logger:: { log_debug, log_error, log_info, log_trace, LdkLogger , Logger } ;
@@ -1936,7 +1934,7 @@ impl Node {
19361934 } )
19371935 }
19381936
1939- /// Return the features used in node announcement.
1937+ /// Returns the node's invariant features used in node announcement.
19401938 pub fn node_features ( & self ) -> NodeFeatures {
19411939 let gossip_features = match self . gossip_source . as_gossip_sync ( ) {
19421940 lightning_background_processor:: GossipSync :: P2P ( p2p_gossip_sync) => {
@@ -1957,41 +1955,6 @@ impl Node {
19571955 . map ( |ls| ls. liquidity_manager ( ) . provided_node_features ( ) )
19581956 . unwrap_or_else ( NodeFeatures :: empty)
19591957 }
1960-
1961- /// Return the node's init features.
1962- pub fn init_features ( & self ) -> InitFeatures {
1963- let gossip_init_features = match self . gossip_source . as_gossip_sync ( ) {
1964- lightning_background_processor:: GossipSync :: P2P ( p2p_gossip_sync) => {
1965- p2p_gossip_sync. provided_init_features ( self . node_id ( ) )
1966- } ,
1967- lightning_background_processor:: GossipSync :: Rapid ( _) => InitFeatures :: empty ( ) ,
1968- lightning_background_processor:: GossipSync :: None => {
1969- unreachable ! ( "We must always have a gossip sync!" )
1970- } ,
1971- } ;
1972- self . channel_manager . init_features ( )
1973- | self . chain_monitor . provided_init_features ( self . node_id ( ) )
1974- | self . onion_messenger . provided_init_features ( self . node_id ( ) )
1975- | gossip_init_features
1976- | self
1977- . liquidity_source
1978- . as_ref ( )
1979- . map ( |ls| ls. liquidity_manager ( ) . provided_init_features ( self . node_id ( ) ) )
1980- . unwrap_or_else ( InitFeatures :: empty)
1981- }
1982-
1983- /// Return the node's channel features.
1984- pub fn channel_features ( & self ) -> ChannelFeatures {
1985- self . channel_manager . channel_features ( )
1986- }
1987-
1988- /// Return the node's BOLT 11 invoice features.
1989- pub fn bolt11_invoice_features ( & self ) -> Bolt11InvoiceFeatures {
1990- // bolt11_invoice_features() is not public because feature
1991- // flags can vary due to invoice type, so we convert from
1992- // context.
1993- self . channel_manager . init_features ( ) . to_context ( )
1994- }
19951958}
19961959
19971960impl Drop for Node {
0 commit comments