@@ -780,7 +780,8 @@ mod tests {
780780 use utils:: create_invoice_from_channelmanager_and_duration_since_epoch;
781781 use bitcoin_hashes:: sha256:: Hash as Sha256 ;
782782 use lightning:: ln:: PaymentPreimage ;
783- use lightning:: ln:: features:: { ChannelFeatures , NodeFeatures , InitFeatures } ;
783+ use lightning:: ln:: channelmanager;
784+ use lightning:: ln:: features:: { ChannelFeatures , NodeFeatures } ;
784785 use lightning:: ln:: functional_test_utils:: * ;
785786 use lightning:: ln:: msgs:: { ChannelMessageHandler , ErrorAction , LightningError } ;
786787 use lightning:: routing:: gossip:: { EffectiveCapacity , NodeId } ;
@@ -2160,24 +2161,24 @@ mod tests {
21602161 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None , None ] ) ;
21612162 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
21622163
2163- create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
2164- create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
2164+ create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) ;
2165+ create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) ;
21652166 let chans = nodes[ 0 ] . node . list_usable_channels ( ) ;
21662167 let mut route = Route {
21672168 paths : vec ! [
21682169 vec![ RouteHop {
21692170 pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2170- node_features: NodeFeatures :: known ( ) ,
2171+ node_features: channelmanager :: provided_node_features ( ) ,
21712172 short_channel_id: chans[ 0 ] . short_channel_id. unwrap( ) ,
2172- channel_features: ChannelFeatures :: known ( ) ,
2173+ channel_features: channelmanager :: provided_channel_features ( ) ,
21732174 fee_msat: 10_000 ,
21742175 cltv_expiry_delta: 100 ,
21752176 } ] ,
21762177 vec![ RouteHop {
21772178 pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2178- node_features: NodeFeatures :: known ( ) ,
2179+ node_features: channelmanager :: provided_node_features ( ) ,
21792180 short_channel_id: chans[ 1 ] . short_channel_id. unwrap( ) ,
2180- channel_features: ChannelFeatures :: known ( ) ,
2181+ channel_features: channelmanager :: provided_channel_features ( ) ,
21812182 fee_msat: 100_000_001 , // Our default max-HTLC-value is 10% of the channel value, which this is one more than
21822183 cltv_expiry_delta: 100 ,
21832184 } ] ,
@@ -2212,16 +2213,16 @@ mod tests {
22122213 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None , None ] ) ;
22132214 let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
22142215
2215- create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
2216- create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
2216+ create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) ;
2217+ create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) ;
22172218 let chans = nodes[ 0 ] . node . list_usable_channels ( ) ;
22182219 let mut route = Route {
22192220 paths : vec ! [
22202221 vec![ RouteHop {
22212222 pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2222- node_features: NodeFeatures :: known ( ) ,
2223+ node_features: channelmanager :: provided_node_features ( ) ,
22232224 short_channel_id: chans[ 0 ] . short_channel_id. unwrap( ) ,
2224- channel_features: ChannelFeatures :: known ( ) ,
2225+ channel_features: channelmanager :: provided_channel_features ( ) ,
22252226 fee_msat: 100_000_001 , // Our default max-HTLC-value is 10% of the channel value, which this is one more than
22262227 cltv_expiry_delta: 100 ,
22272228 } ] ,
@@ -2271,38 +2272,38 @@ mod tests {
22712272 let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
22722273 let nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
22732274
2274- let chan_1_scid = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 10_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
2275- let chan_2_scid = create_announced_chan_between_nodes_with_value ( & nodes, 1 , 2 , 10_000_000 , 0 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
2275+ let chan_1_scid = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 10_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) . 0 . contents . short_channel_id ;
2276+ let chan_2_scid = create_announced_chan_between_nodes_with_value ( & nodes, 1 , 2 , 10_000_000 , 0 , channelmanager :: provided_init_features ( ) , channelmanager :: provided_init_features ( ) ) . 0 . contents . short_channel_id ;
22762277
22772278 let mut route = Route {
22782279 paths : vec ! [
22792280 vec![ RouteHop {
22802281 pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2281- node_features: NodeFeatures :: known ( ) ,
2282+ node_features: channelmanager :: provided_node_features ( ) ,
22822283 short_channel_id: chan_1_scid,
2283- channel_features: ChannelFeatures :: known ( ) ,
2284+ channel_features: channelmanager :: provided_channel_features ( ) ,
22842285 fee_msat: 0 ,
22852286 cltv_expiry_delta: 100 ,
22862287 } , RouteHop {
22872288 pubkey: nodes[ 2 ] . node. get_our_node_id( ) ,
2288- node_features: NodeFeatures :: known ( ) ,
2289+ node_features: channelmanager :: provided_node_features ( ) ,
22892290 short_channel_id: chan_2_scid,
2290- channel_features: ChannelFeatures :: known ( ) ,
2291+ channel_features: channelmanager :: provided_channel_features ( ) ,
22912292 fee_msat: 100_000_000 ,
22922293 cltv_expiry_delta: 100 ,
22932294 } ] ,
22942295 vec![ RouteHop {
22952296 pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2296- node_features: NodeFeatures :: known ( ) ,
2297+ node_features: channelmanager :: provided_node_features ( ) ,
22972298 short_channel_id: chan_1_scid,
2298- channel_features: ChannelFeatures :: known ( ) ,
2299+ channel_features: channelmanager :: provided_channel_features ( ) ,
22992300 fee_msat: 0 ,
23002301 cltv_expiry_delta: 100 ,
23012302 } , RouteHop {
23022303 pubkey: nodes[ 2 ] . node. get_our_node_id( ) ,
2303- node_features: NodeFeatures :: known ( ) ,
2304+ node_features: channelmanager :: provided_node_features ( ) ,
23042305 short_channel_id: chan_2_scid,
2305- channel_features: ChannelFeatures :: known ( ) ,
2306+ channel_features: channelmanager :: provided_channel_features ( ) ,
23062307 fee_msat: 100_000_000 ,
23072308 cltv_expiry_delta: 100 ,
23082309 } ]
0 commit comments