@@ -780,7 +780,8 @@ mod tests {
780
780
use utils:: create_invoice_from_channelmanager_and_duration_since_epoch;
781
781
use bitcoin_hashes:: sha256:: Hash as Sha256 ;
782
782
use lightning:: ln:: PaymentPreimage ;
783
- use lightning:: ln:: features:: { ChannelFeatures , NodeFeatures , InitFeatures } ;
783
+ use lightning:: ln:: channelmanager;
784
+ use lightning:: ln:: features:: { ChannelFeatures , NodeFeatures } ;
784
785
use lightning:: ln:: functional_test_utils:: * ;
785
786
use lightning:: ln:: msgs:: { ChannelMessageHandler , ErrorAction , LightningError } ;
786
787
use lightning:: routing:: gossip:: { EffectiveCapacity , NodeId } ;
@@ -2160,24 +2161,24 @@ mod tests {
2160
2161
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None , None ] ) ;
2161
2162
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
2162
2163
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 ( ) ) ;
2165
2166
let chans = nodes[ 0 ] . node . list_usable_channels ( ) ;
2166
2167
let mut route = Route {
2167
2168
paths : vec ! [
2168
2169
vec![ RouteHop {
2169
2170
pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2170
- node_features: NodeFeatures :: known ( ) ,
2171
+ node_features: channelmanager :: provided_node_features ( ) ,
2171
2172
short_channel_id: chans[ 0 ] . short_channel_id. unwrap( ) ,
2172
- channel_features: ChannelFeatures :: known ( ) ,
2173
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2173
2174
fee_msat: 10_000 ,
2174
2175
cltv_expiry_delta: 100 ,
2175
2176
} ] ,
2176
2177
vec![ RouteHop {
2177
2178
pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2178
- node_features: NodeFeatures :: known ( ) ,
2179
+ node_features: channelmanager :: provided_node_features ( ) ,
2179
2180
short_channel_id: chans[ 1 ] . short_channel_id. unwrap( ) ,
2180
- channel_features: ChannelFeatures :: known ( ) ,
2181
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2181
2182
fee_msat: 100_000_001 , // Our default max-HTLC-value is 10% of the channel value, which this is one more than
2182
2183
cltv_expiry_delta: 100 ,
2183
2184
} ] ,
@@ -2212,16 +2213,16 @@ mod tests {
2212
2213
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None , None ] ) ;
2213
2214
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
2214
2215
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 ( ) ) ;
2217
2218
let chans = nodes[ 0 ] . node . list_usable_channels ( ) ;
2218
2219
let mut route = Route {
2219
2220
paths : vec ! [
2220
2221
vec![ RouteHop {
2221
2222
pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2222
- node_features: NodeFeatures :: known ( ) ,
2223
+ node_features: channelmanager :: provided_node_features ( ) ,
2223
2224
short_channel_id: chans[ 0 ] . short_channel_id. unwrap( ) ,
2224
- channel_features: ChannelFeatures :: known ( ) ,
2225
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2225
2226
fee_msat: 100_000_001 , // Our default max-HTLC-value is 10% of the channel value, which this is one more than
2226
2227
cltv_expiry_delta: 100 ,
2227
2228
} ] ,
@@ -2271,38 +2272,38 @@ mod tests {
2271
2272
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
2272
2273
let nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
2273
2274
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 ;
2276
2277
2277
2278
let mut route = Route {
2278
2279
paths : vec ! [
2279
2280
vec![ RouteHop {
2280
2281
pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2281
- node_features: NodeFeatures :: known ( ) ,
2282
+ node_features: channelmanager :: provided_node_features ( ) ,
2282
2283
short_channel_id: chan_1_scid,
2283
- channel_features: ChannelFeatures :: known ( ) ,
2284
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2284
2285
fee_msat: 0 ,
2285
2286
cltv_expiry_delta: 100 ,
2286
2287
} , RouteHop {
2287
2288
pubkey: nodes[ 2 ] . node. get_our_node_id( ) ,
2288
- node_features: NodeFeatures :: known ( ) ,
2289
+ node_features: channelmanager :: provided_node_features ( ) ,
2289
2290
short_channel_id: chan_2_scid,
2290
- channel_features: ChannelFeatures :: known ( ) ,
2291
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2291
2292
fee_msat: 100_000_000 ,
2292
2293
cltv_expiry_delta: 100 ,
2293
2294
} ] ,
2294
2295
vec![ RouteHop {
2295
2296
pubkey: nodes[ 1 ] . node. get_our_node_id( ) ,
2296
- node_features: NodeFeatures :: known ( ) ,
2297
+ node_features: channelmanager :: provided_node_features ( ) ,
2297
2298
short_channel_id: chan_1_scid,
2298
- channel_features: ChannelFeatures :: known ( ) ,
2299
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2299
2300
fee_msat: 0 ,
2300
2301
cltv_expiry_delta: 100 ,
2301
2302
} , RouteHop {
2302
2303
pubkey: nodes[ 2 ] . node. get_our_node_id( ) ,
2303
- node_features: NodeFeatures :: known ( ) ,
2304
+ node_features: channelmanager :: provided_node_features ( ) ,
2304
2305
short_channel_id: chan_2_scid,
2305
- channel_features: ChannelFeatures :: known ( ) ,
2306
+ channel_features: channelmanager :: provided_channel_features ( ) ,
2306
2307
fee_msat: 100_000_000 ,
2307
2308
cltv_expiry_delta: 100 ,
2308
2309
} ]
0 commit comments