@@ -38,7 +38,7 @@ use lightning::chain::transaction::OutPoint;
38
38
use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator } ;
39
39
use lightning:: chain:: keysinterface:: { KeyMaterial , KeysInterface , InMemorySigner , Recipient , EntropySource , NodeSigner , SignerProvider } ;
40
40
use lightning:: ln:: { PaymentHash , PaymentPreimage , PaymentSecret } ;
41
- use lightning:: ln:: channelmanager:: { self , ChainParameters , ChannelDetails , ChannelManager , PaymentSendFailure , ChannelManagerReadArgs , PaymentId } ;
41
+ use lightning:: ln:: channelmanager:: { ChainParameters , ChannelDetails , ChannelManager , PaymentSendFailure , ChannelManagerReadArgs , PaymentId } ;
42
42
use lightning:: ln:: channel:: FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE ;
43
43
use lightning:: ln:: msgs:: { self , CommitmentUpdate , ChannelMessageHandler , DecodeError , UpdateAddHTLC , Init } ;
44
44
use lightning:: ln:: script:: ShutdownScript ;
@@ -353,9 +353,9 @@ fn send_payment(source: &ChanMan, dest: &ChanMan, dest_chan_id: u64, amt: u64, p
353
353
if let Err ( err) = source. send_payment ( & Route {
354
354
paths : vec ! [ vec![ RouteHop {
355
355
pubkey: dest. get_our_node_id( ) ,
356
- node_features: channelmanager :: provided_node_features ( ) ,
356
+ node_features: dest . node_features ( ) ,
357
357
short_channel_id: dest_chan_id,
358
- channel_features: channelmanager :: provided_channel_features ( ) ,
358
+ channel_features: dest . channel_features ( ) ,
359
359
fee_msat: amt,
360
360
cltv_expiry_delta: 200 ,
361
361
} ] ] ,
@@ -375,16 +375,16 @@ fn send_hop_payment(source: &ChanMan, middle: &ChanMan, middle_chan_id: u64, des
375
375
if let Err ( err) = source. send_payment ( & Route {
376
376
paths : vec ! [ vec![ RouteHop {
377
377
pubkey: middle. get_our_node_id( ) ,
378
- node_features: channelmanager :: provided_node_features ( ) ,
378
+ node_features: middle . node_features ( ) ,
379
379
short_channel_id: middle_chan_id,
380
- channel_features: channelmanager :: provided_channel_features ( ) ,
380
+ channel_features: middle . channel_features ( ) ,
381
381
fee_msat: 50000 ,
382
382
cltv_expiry_delta: 100 ,
383
383
} , RouteHop {
384
384
pubkey: dest. get_our_node_id( ) ,
385
- node_features: channelmanager :: provided_node_features ( ) ,
385
+ node_features: dest . node_features ( ) ,
386
386
short_channel_id: dest_chan_id,
387
- channel_features: channelmanager :: provided_channel_features ( ) ,
387
+ channel_features: dest . channel_features ( ) ,
388
388
fee_msat: amt,
389
389
cltv_expiry_delta: 200 ,
390
390
} ] ] ,
@@ -470,8 +470,8 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
470
470
let mut channel_txn = Vec :: new ( ) ;
471
471
macro_rules! make_channel {
472
472
( $source: expr, $dest: expr, $chan_id: expr) => { {
473
- $source. peer_connected( & $dest. get_our_node_id( ) , & Init { features: channelmanager :: provided_init_features ( ) , remote_network_address: None } ) . unwrap( ) ;
474
- $dest. peer_connected( & $source. get_our_node_id( ) , & Init { features: channelmanager :: provided_init_features ( ) , remote_network_address: None } ) . unwrap( ) ;
473
+ $source. peer_connected( & $dest. get_our_node_id( ) , & Init { features: $dest . init_features ( ) , remote_network_address: None } ) . unwrap( ) ;
474
+ $dest. peer_connected( & $source. get_our_node_id( ) , & Init { features: $source . init_features ( ) , remote_network_address: None } ) . unwrap( ) ;
475
475
476
476
$source. create_channel( $dest. get_our_node_id( ) , 100_000 , 42 , 0 , None ) . unwrap( ) ;
477
477
let open_channel = {
@@ -482,7 +482,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
482
482
} else { panic!( "Wrong event type" ) ; }
483
483
} ;
484
484
485
- $dest. handle_open_channel( & $source. get_our_node_id( ) , channelmanager :: provided_init_features ( ) , & open_channel) ;
485
+ $dest. handle_open_channel( & $source. get_our_node_id( ) , $source . init_features ( ) , & open_channel) ;
486
486
let accept_channel = {
487
487
let events = $dest. get_and_clear_pending_msg_events( ) ;
488
488
assert_eq!( events. len( ) , 1 ) ;
@@ -491,7 +491,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
491
491
} else { panic!( "Wrong event type" ) ; }
492
492
} ;
493
493
494
- $source. handle_accept_channel( & $dest. get_our_node_id( ) , channelmanager :: provided_init_features ( ) , & accept_channel) ;
494
+ $source. handle_accept_channel( & $dest. get_our_node_id( ) , $dest . init_features ( ) , & accept_channel) ;
495
495
let funding_output;
496
496
{
497
497
let events = $source. get_and_clear_pending_events( ) ;
@@ -990,15 +990,15 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
990
990
} ,
991
991
0x0e => {
992
992
if chan_a_disconnected {
993
- nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
994
- nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
993
+ nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes [ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
994
+ nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes [ 0 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
995
995
chan_a_disconnected = false ;
996
996
}
997
997
} ,
998
998
0x0f => {
999
999
if chan_b_disconnected {
1000
- nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1001
- nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1000
+ nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes [ 2 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1001
+ nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes [ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1002
1002
chan_b_disconnected = false ;
1003
1003
}
1004
1004
} ,
@@ -1193,13 +1193,13 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
1193
1193
1194
1194
// Next, make sure peers are all connected to each other
1195
1195
if chan_a_disconnected {
1196
- nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1197
- nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1196
+ nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes [ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1197
+ nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes [ 0 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1198
1198
chan_a_disconnected = false ;
1199
1199
}
1200
1200
if chan_b_disconnected {
1201
- nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1202
- nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : channelmanager :: provided_init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1201
+ nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes [ 2 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1202
+ nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes [ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1203
1203
chan_b_disconnected = false ;
1204
1204
}
1205
1205
0 commit comments