@@ -317,13 +317,11 @@ fn do_chanmon_claim_value_coop_close(keyed_anchors: bool, p2a_anchor: bool) {
317
317
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
318
318
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
319
319
let mut user_config = test_default_channel_config ( ) ;
320
- if keyed_anchors {
321
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
322
- user_config. manually_accept_inbound_channels = true ;
323
- } else if p2a_anchor {
324
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
325
- user_config. manually_accept_inbound_channels = true ;
326
- }
320
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
321
+ user_config. manually_accept_inbound_channels = true ;
322
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
323
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
324
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
327
325
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
328
326
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
329
327
@@ -472,13 +470,9 @@ fn do_test_claim_value_force_close(keyed_anchors: bool, p2a_anchor: bool, prev_c
472
470
}
473
471
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
474
472
let mut user_config = test_default_channel_config ( ) ;
475
- if keyed_anchors {
476
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
477
- user_config. manually_accept_inbound_channels = true ;
478
- } else if p2a_anchor {
479
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
480
- user_config. manually_accept_inbound_channels = true ;
481
- }
473
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
474
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
475
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
482
476
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
483
477
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
484
478
@@ -875,13 +869,9 @@ fn do_test_balances_on_local_commitment_htlcs(keyed_anchors: bool, p2a_anchor: b
875
869
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
876
870
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
877
871
let mut user_config = test_default_channel_config ( ) ;
878
- if keyed_anchors {
879
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
880
- user_config. manually_accept_inbound_channels = true ;
881
- } else if p2a_anchor {
882
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
883
- user_config. manually_accept_inbound_channels = true ;
884
- }
872
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
873
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
874
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
885
875
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
886
876
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
887
877
@@ -1390,13 +1380,9 @@ fn do_test_revoked_counterparty_commitment_balances(keyed_anchors: bool, p2a_anc
1390
1380
chanmon_cfgs[ 1 ] . keys_manager . disable_revocation_policy_check = true ;
1391
1381
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1392
1382
let mut user_config = test_default_channel_config ( ) ;
1393
- if keyed_anchors {
1394
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
1395
- user_config. manually_accept_inbound_channels = true ;
1396
- } else if p2a_anchor {
1397
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
1398
- user_config. manually_accept_inbound_channels = true ;
1399
- }
1383
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
1384
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
1385
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
1400
1386
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
1401
1387
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1402
1388
@@ -1697,13 +1683,9 @@ fn do_test_revoked_counterparty_htlc_tx_balances(keyed_anchors: bool, p2a_anchor
1697
1683
chanmon_cfgs[ 1 ] . keys_manager . disable_revocation_policy_check = true ;
1698
1684
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1699
1685
let mut user_config = test_default_channel_config ( ) ;
1700
- if keyed_anchors {
1701
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
1702
- user_config. manually_accept_inbound_channels = true ;
1703
- } else if p2a_anchor {
1704
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
1705
- user_config. manually_accept_inbound_channels = true ;
1706
- }
1686
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
1687
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
1688
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
1707
1689
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
1708
1690
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
1709
1691
@@ -1991,13 +1973,9 @@ fn do_test_revoked_counterparty_aggregated_claims(keyed_anchors: bool, p2a_ancho
1991
1973
chanmon_cfgs[ 0 ] . keys_manager . disable_revocation_policy_check = true ;
1992
1974
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1993
1975
let mut user_config = test_default_channel_config ( ) ;
1994
- if keyed_anchors {
1995
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
1996
- user_config. manually_accept_inbound_channels = true ;
1997
- } else if p2a_anchor {
1998
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
1999
- user_config. manually_accept_inbound_channels = true ;
2000
- }
1976
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
1977
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
1978
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
2001
1979
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
2002
1980
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
2003
1981
@@ -2272,13 +2250,9 @@ fn do_test_claimable_balance_correct_while_payment_pending(outbound_payment: boo
2272
2250
let mut chanmon_cfgs = create_chanmon_cfgs ( 3 ) ;
2273
2251
let node_cfgs = create_node_cfgs ( 3 , & chanmon_cfgs) ;
2274
2252
let mut user_config = test_default_channel_config ( ) ;
2275
- if keyed_anchors {
2276
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
2277
- user_config. manually_accept_inbound_channels = true ;
2278
- } else if p2a_anchor {
2279
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
2280
- user_config. manually_accept_inbound_channels = true ;
2281
- }
2253
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
2254
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
2255
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
2282
2256
let node_chanmgrs = create_node_chanmgrs ( 3 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
2283
2257
let nodes = create_network ( 3 , & node_cfgs, & node_chanmgrs) ;
2284
2258
@@ -2425,13 +2399,9 @@ fn do_test_monitor_rebroadcast_pending_claims(keyed_anchors: bool, p2a_anchor: b
2425
2399
let mut chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
2426
2400
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
2427
2401
let mut config = test_default_channel_config ( ) ;
2428
- if keyed_anchors {
2429
- config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
2430
- config. manually_accept_inbound_channels = true ;
2431
- } else if p2a_anchor {
2432
- config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
2433
- config. manually_accept_inbound_channels = true ;
2434
- }
2402
+ config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
2403
+ config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
2404
+ config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
2435
2405
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( config. clone ( ) ) , Some ( config) ] ) ;
2436
2406
let nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
2437
2407
@@ -3156,13 +3126,9 @@ fn do_test_monitor_claims_with_random_signatures(keyed_anchors: bool, p2a_anchor
3156
3126
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
3157
3127
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
3158
3128
let mut user_config = test_default_channel_config ( ) ;
3159
- if keyed_anchors {
3160
- user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = true ;
3161
- user_config. manually_accept_inbound_channels = true ;
3162
- } else if p2a_anchor {
3163
- user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = true ;
3164
- user_config. manually_accept_inbound_channels = true ;
3165
- }
3129
+ user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx = keyed_anchors;
3130
+ user_config. channel_handshake_config . negotiate_anchor_zero_fee_commitments = p2a_anchor;
3131
+ user_config. manually_accept_inbound_channels = keyed_anchors || p2a_anchor;
3166
3132
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ Some ( user_config. clone ( ) ) , Some ( user_config) ] ) ;
3167
3133
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
3168
3134
0 commit comments