@@ -295,7 +295,7 @@ fn check_api_err(api_err: APIError) {
295
295
// all others. If you hit this panic, the list of acceptable errors
296
296
// is probably just stale and you should add new messages here.
297
297
match err. as_str ( ) {
298
- "Peer for first hop currently disconnected/pending monitor update! " => { } ,
298
+ "Peer for first hop currently disconnected" => { } ,
299
299
_ if err. starts_with ( "Cannot push more than their max accepted HTLCs " ) => { } ,
300
300
_ if err. starts_with ( "Cannot send value that would put us over the max HTLC value in flight our peer will accept " ) => { } ,
301
301
_ if err. starts_with ( "Cannot send value that would put our balance under counterparty-announced channel reserve value" ) => { } ,
@@ -474,8 +474,8 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
474
474
let mut channel_txn = Vec :: new ( ) ;
475
475
macro_rules! make_channel {
476
476
( $source: expr, $dest: expr, $chan_id: expr) => { {
477
- $source. peer_connected( & $dest. get_our_node_id( ) , & Init { features: $dest. init_features( ) , remote_network_address: None } ) . unwrap( ) ;
478
- $dest. peer_connected( & $source. get_our_node_id( ) , & Init { features: $source. init_features( ) , remote_network_address: None } ) . unwrap( ) ;
477
+ $source. peer_connected( & $dest. get_our_node_id( ) , & Init { features: $dest. init_features( ) , remote_network_address: None } , true ) . unwrap( ) ;
478
+ $dest. peer_connected( & $source. get_our_node_id( ) , & Init { features: $source. init_features( ) , remote_network_address: None } , false ) . unwrap( ) ;
479
479
480
480
$source. create_channel( $dest. get_our_node_id( ) , 100_000 , 42 , 0 , None ) . unwrap( ) ;
481
481
let open_channel = {
@@ -979,31 +979,31 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
979
979
980
980
0x0c => {
981
981
if !chan_a_disconnected {
982
- nodes[ 0 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) , false ) ;
983
- nodes[ 1 ] . peer_disconnected ( & nodes[ 0 ] . get_our_node_id ( ) , false ) ;
982
+ nodes[ 0 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) ) ;
983
+ nodes[ 1 ] . peer_disconnected ( & nodes[ 0 ] . get_our_node_id ( ) ) ;
984
984
chan_a_disconnected = true ;
985
985
drain_msg_events_on_disconnect ! ( 0 ) ;
986
986
}
987
987
} ,
988
988
0x0d => {
989
989
if !chan_b_disconnected {
990
- nodes[ 1 ] . peer_disconnected ( & nodes[ 2 ] . get_our_node_id ( ) , false ) ;
991
- nodes[ 2 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) , false ) ;
990
+ nodes[ 1 ] . peer_disconnected ( & nodes[ 2 ] . get_our_node_id ( ) ) ;
991
+ nodes[ 2 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) ) ;
992
992
chan_b_disconnected = true ;
993
993
drain_msg_events_on_disconnect ! ( 2 ) ;
994
994
}
995
995
} ,
996
996
0x0e => {
997
997
if chan_a_disconnected {
998
- nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
999
- nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes[ 0 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
998
+ nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } , true ) . unwrap ( ) ;
999
+ nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes[ 0 ] . init_features ( ) , remote_network_address : None } , false ) . unwrap ( ) ;
1000
1000
chan_a_disconnected = false ;
1001
1001
}
1002
1002
} ,
1003
1003
0x0f => {
1004
1004
if chan_b_disconnected {
1005
- nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes[ 2 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1006
- nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1005
+ nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes[ 2 ] . init_features ( ) , remote_network_address : None } , true ) . unwrap ( ) ;
1006
+ nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } , false ) . unwrap ( ) ;
1007
1007
chan_b_disconnected = false ;
1008
1008
}
1009
1009
} ,
@@ -1040,7 +1040,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
1040
1040
1041
1041
0x2c => {
1042
1042
if !chan_a_disconnected {
1043
- nodes[ 1 ] . peer_disconnected ( & nodes[ 0 ] . get_our_node_id ( ) , false ) ;
1043
+ nodes[ 1 ] . peer_disconnected ( & nodes[ 0 ] . get_our_node_id ( ) ) ;
1044
1044
chan_a_disconnected = true ;
1045
1045
drain_msg_events_on_disconnect ! ( 0 ) ;
1046
1046
}
@@ -1054,14 +1054,14 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
1054
1054
} ,
1055
1055
0x2d => {
1056
1056
if !chan_a_disconnected {
1057
- nodes[ 0 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) , false ) ;
1057
+ nodes[ 0 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) ) ;
1058
1058
chan_a_disconnected = true ;
1059
1059
nodes[ 0 ] . get_and_clear_pending_msg_events ( ) ;
1060
1060
ab_events. clear ( ) ;
1061
1061
ba_events. clear ( ) ;
1062
1062
}
1063
1063
if !chan_b_disconnected {
1064
- nodes[ 2 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) , false ) ;
1064
+ nodes[ 2 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) ) ;
1065
1065
chan_b_disconnected = true ;
1066
1066
nodes[ 2 ] . get_and_clear_pending_msg_events ( ) ;
1067
1067
bc_events. clear ( ) ;
@@ -1073,7 +1073,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
1073
1073
} ,
1074
1074
0x2e => {
1075
1075
if !chan_b_disconnected {
1076
- nodes[ 1 ] . peer_disconnected ( & nodes[ 2 ] . get_our_node_id ( ) , false ) ;
1076
+ nodes[ 1 ] . peer_disconnected ( & nodes[ 2 ] . get_our_node_id ( ) ) ;
1077
1077
chan_b_disconnected = true ;
1078
1078
drain_msg_events_on_disconnect ! ( 2 ) ;
1079
1079
}
@@ -1198,13 +1198,13 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out) {
1198
1198
1199
1199
// Next, make sure peers are all connected to each other
1200
1200
if chan_a_disconnected {
1201
- nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1202
- nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes[ 0 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1201
+ nodes[ 0 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } , true ) . unwrap ( ) ;
1202
+ nodes[ 1 ] . peer_connected ( & nodes[ 0 ] . get_our_node_id ( ) , & Init { features : nodes[ 0 ] . init_features ( ) , remote_network_address : None } , false ) . unwrap ( ) ;
1203
1203
chan_a_disconnected = false ;
1204
1204
}
1205
1205
if chan_b_disconnected {
1206
- nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes[ 2 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1207
- nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } ) . unwrap ( ) ;
1206
+ nodes[ 1 ] . peer_connected ( & nodes[ 2 ] . get_our_node_id ( ) , & Init { features : nodes[ 2 ] . init_features ( ) , remote_network_address : None } , true ) . unwrap ( ) ;
1207
+ nodes[ 2 ] . peer_connected ( & nodes[ 1 ] . get_our_node_id ( ) , & Init { features : nodes[ 1 ] . init_features ( ) , remote_network_address : None } , false ) . unwrap ( ) ;
1208
1208
chan_b_disconnected = false ;
1209
1209
}
1210
1210
0 commit comments