@@ -24,7 +24,7 @@ fn test_simple_monitor_permanent_update_fail() {
24
24
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
25
25
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
26
26
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
27
- create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
27
+ create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
28
28
29
29
let route = nodes[ 0 ] . router . get_route ( & nodes[ 1 ] . node . get_our_node_id ( ) , None , & Vec :: new ( ) , 1000000 , TEST_FINAL_CLTV ) . unwrap ( ) ;
30
30
let ( _, payment_hash_1) = get_payment_preimage_hash ! ( & nodes[ 0 ] ) ;
@@ -57,7 +57,7 @@ fn do_test_simple_monitor_temporary_update_fail(disconnect: bool) {
57
57
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
58
58
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
59
59
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
60
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
60
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
61
61
62
62
let route = nodes[ 0 ] . router . get_route ( & nodes[ 1 ] . node . get_our_node_id ( ) , None , & Vec :: new ( ) , 1000000 , TEST_FINAL_CLTV ) . unwrap ( ) ;
63
63
let ( payment_preimage_1, payment_hash_1) = get_payment_preimage_hash ! ( & nodes[ 0 ] ) ;
@@ -161,7 +161,7 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
161
161
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
162
162
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
163
163
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
164
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
164
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
165
165
166
166
let ( payment_preimage_1, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1000000 ) ;
167
167
@@ -493,7 +493,7 @@ fn test_monitor_update_fail_cs() {
493
493
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
494
494
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
495
495
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
496
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
496
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
497
497
498
498
let route = nodes[ 0 ] . router . get_route ( & nodes[ 1 ] . node . get_our_node_id ( ) , None , & Vec :: new ( ) , 1000000 , TEST_FINAL_CLTV ) . unwrap ( ) ;
499
499
let ( payment_preimage, our_payment_hash) = get_payment_preimage_hash ! ( nodes[ 0 ] ) ;
@@ -578,7 +578,7 @@ fn test_monitor_update_fail_no_rebroadcast() {
578
578
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
579
579
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
580
580
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
581
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
581
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
582
582
583
583
let route = nodes[ 0 ] . router . get_route ( & nodes[ 1 ] . node . get_our_node_id ( ) , None , & Vec :: new ( ) , 1000000 , TEST_FINAL_CLTV ) . unwrap ( ) ;
584
584
let ( payment_preimage_1, our_payment_hash) = get_payment_preimage_hash ! ( nodes[ 0 ] ) ;
@@ -624,7 +624,7 @@ fn test_monitor_update_raa_while_paused() {
624
624
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
625
625
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
626
626
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
627
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
627
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
628
628
629
629
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 5000000 , 5_000_000 ) ;
630
630
@@ -695,8 +695,8 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
695
695
let node_cfgs = create_node_cfgs ( 3 , & chanmon_cfgs) ;
696
696
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
697
697
let mut nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
698
- create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
699
- let chan_2 = create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
698
+ create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
699
+ let chan_2 = create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
700
700
701
701
// Rebalance a bit so that we can send backwards from 2 to 1.
702
702
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 , 5_000_000 ) ;
@@ -953,8 +953,8 @@ fn test_monitor_update_fail_reestablish() {
953
953
let node_cfgs = create_node_cfgs ( 3 , & chanmon_cfgs) ;
954
954
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
955
955
let mut nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
956
- let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
957
- create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
956
+ let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
957
+ create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
958
958
959
959
let ( our_payment_preimage, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
960
960
@@ -1035,7 +1035,7 @@ fn raa_no_response_awaiting_raa_state() {
1035
1035
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1036
1036
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1037
1037
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1038
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
1038
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
1039
1039
1040
1040
let route = nodes[ 0 ] . router . get_route ( & nodes[ 1 ] . node . get_our_node_id ( ) , None , & Vec :: new ( ) , 1000000 , TEST_FINAL_CLTV ) . unwrap ( ) ;
1041
1041
let ( payment_preimage_1, payment_hash_1) = get_payment_preimage_hash ! ( nodes[ 0 ] ) ;
@@ -1152,7 +1152,7 @@ fn claim_while_disconnected_monitor_update_fail() {
1152
1152
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1153
1153
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1154
1154
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1155
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
1155
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
1156
1156
1157
1157
// Forward a payment for B to claim
1158
1158
let ( payment_preimage_1, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1000000 ) ;
@@ -1272,7 +1272,7 @@ fn monitor_failed_no_reestablish_response() {
1272
1272
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1273
1273
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1274
1274
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1275
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
1275
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
1276
1276
1277
1277
// Route the payment and deliver the initial commitment_signed (with a monitor update failure
1278
1278
// on receipt).
@@ -1342,7 +1342,7 @@ fn first_message_on_recv_ordering() {
1342
1342
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1343
1343
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1344
1344
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1345
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
1345
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
1346
1346
1347
1347
// Route the first payment outbound, holding the last RAA for B until we are set up so that we
1348
1348
// can deliver it and fail the monitor update.
@@ -1432,8 +1432,8 @@ fn test_monitor_update_fail_claim() {
1432
1432
let node_cfgs = create_node_cfgs ( 3 , & chanmon_cfgs) ;
1433
1433
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
1434
1434
let mut nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
1435
- let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
1436
- create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
1435
+ let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
1436
+ create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
1437
1437
1438
1438
// Rebalance a bit so that we can send backwards from 3 to 2.
1439
1439
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 , 5_000_000 ) ;
@@ -1509,8 +1509,8 @@ fn test_monitor_update_on_pending_forwards() {
1509
1509
let node_cfgs = create_node_cfgs ( 3 , & chanmon_cfgs) ;
1510
1510
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ None , None , None ] ) ;
1511
1511
let mut nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
1512
- let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
1513
- create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
1512
+ let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
1513
+ create_announced_chan_between_nodes ( & nodes, 1 , 2 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
1514
1514
1515
1515
// Rebalance a bit so that we can send backwards from 3 to 1.
1516
1516
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 , 5_000_000 ) ;
@@ -1578,7 +1578,7 @@ fn monitor_update_claim_fail_no_response() {
1578
1578
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1579
1579
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
1580
1580
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1581
- let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 2 ;
1581
+ let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 2 ;
1582
1582
1583
1583
// Forward a payment for B to claim
1584
1584
let ( payment_preimage_1, _) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1000000 ) ;
@@ -1640,8 +1640,8 @@ fn do_during_funding_monitor_fail(confirm_a_first: bool, restore_b_before_conf:
1640
1640
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1641
1641
1642
1642
nodes[ 0 ] . node . create_channel ( nodes[ 1 ] . node . get_our_node_id ( ) , 100000 , 10001 , 43 , None ) . unwrap ( ) ;
1643
- nodes[ 1 ] . node . handle_open_channel ( & nodes[ 0 ] . node . get_our_node_id ( ) , InitFeatures :: supported ( ) , & get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendOpenChannel , nodes[ 1 ] . node. get_our_node_id( ) ) ) ;
1644
- nodes[ 0 ] . node . handle_accept_channel ( & nodes[ 1 ] . node . get_our_node_id ( ) , InitFeatures :: supported ( ) , & get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendAcceptChannel , nodes[ 0 ] . node. get_our_node_id( ) ) ) ;
1643
+ nodes[ 1 ] . node . handle_open_channel ( & nodes[ 0 ] . node . get_our_node_id ( ) , InitFeatures :: known ( ) , & get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendOpenChannel , nodes[ 1 ] . node. get_our_node_id( ) ) ) ;
1644
+ nodes[ 0 ] . node . handle_accept_channel ( & nodes[ 1 ] . node . get_our_node_id ( ) , InitFeatures :: known ( ) , & get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendAcceptChannel , nodes[ 0 ] . node. get_our_node_id( ) ) ) ;
1645
1645
1646
1646
let ( temporary_channel_id, funding_tx, funding_output) = create_funding_transaction ( & nodes[ 0 ] , 100000 , 43 ) ;
1647
1647
@@ -1741,10 +1741,10 @@ fn test_path_paused_mpp() {
1741
1741
let node_chanmgrs = create_node_chanmgrs ( 4 , & node_cfgs, & [ None , None , None , None ] ) ;
1742
1742
let mut nodes = create_network ( 4 , & node_cfgs, & node_chanmgrs) ;
1743
1743
1744
- let chan_1_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 0 . contents . short_channel_id ;
1745
- let ( chan_2_ann, _, chan_2_id, _) = create_announced_chan_between_nodes ( & nodes, 0 , 2 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) ;
1746
- let chan_3_id = create_announced_chan_between_nodes ( & nodes, 1 , 3 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 0 . contents . short_channel_id ;
1747
- let chan_4_id = create_announced_chan_between_nodes ( & nodes, 2 , 3 , InitFeatures :: supported ( ) , InitFeatures :: supported ( ) ) . 0 . contents . short_channel_id ;
1744
+ let chan_1_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
1745
+ let ( chan_2_ann, _, chan_2_id, _) = create_announced_chan_between_nodes ( & nodes, 0 , 2 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) ;
1746
+ let chan_3_id = create_announced_chan_between_nodes ( & nodes, 1 , 3 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
1747
+ let chan_4_id = create_announced_chan_between_nodes ( & nodes, 2 , 3 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
1748
1748
1749
1749
let ( payment_preimage, payment_hash) = get_payment_preimage_hash ! ( & nodes[ 0 ] ) ;
1750
1750
let payment_secret = PaymentSecret ( [ 0xdb ; 32 ] ) ;
0 commit comments