Skip to content

Commit 4e32d10

Browse files
committed
Remove explicit usage of test_default_channel_config
test_default_channel_config is the default now so it does not need to be set explicitly in some of the tests. Removes unnecessary extra None config.
1 parent 8edfc91 commit 4e32d10

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

lightning/src/ln/reorg_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ fn test_htlc_preimage_claim_holder_commitment_after_counterparty_commitment_reor
686686
let chanmon_cfgs = create_chanmon_cfgs(2);
687687
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
688688
let legacy_cfg = test_legacy_channel_config();
689-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None, None]);
689+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None]);
690690
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
691691

692692
let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes(&nodes, 0, 1);
@@ -762,7 +762,7 @@ fn test_htlc_preimage_claim_prev_counterparty_commitment_after_current_counterpa
762762
let chanmon_cfgs = create_chanmon_cfgs(2);
763763
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
764764
let legacy_cfg = test_legacy_channel_config();
765-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None, None]);
765+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None]);
766766
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
767767

768768
let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes(&nodes, 0, 1);

lightning/src/ln/splicing_tests.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,7 @@ fn do_test_splice_commitment_broadcast(splice_status: SpliceStatus, claim_htlcs:
10811081
// Tests that we're able to enforce HTLCs onchain during the different stages of a splice.
10821082
let chanmon_cfgs = create_chanmon_cfgs(2);
10831083
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1084-
let config = test_default_channel_config();
1085-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
1084+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
10861085
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
10871086

10881087
let node_id_0 = nodes[0].node.get_our_node_id();
@@ -1833,8 +1832,7 @@ fn do_test_propose_splice_while_disconnected(reload: bool, use_0conf: bool) {
18331832
fn disconnect_on_unexpected_interactive_tx_message() {
18341833
let chanmon_cfgs = create_chanmon_cfgs(2);
18351834
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1836-
let config = test_default_channel_config();
1837-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
1835+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
18381836
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
18391837

18401838
let initiator = &nodes[0];
@@ -1872,8 +1870,7 @@ fn disconnect_on_unexpected_interactive_tx_message() {
18721870
fn fail_splice_on_interactive_tx_error() {
18731871
let chanmon_cfgs = create_chanmon_cfgs(2);
18741872
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1875-
let config = test_default_channel_config();
1876-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
1873+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
18771874
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
18781875

18791876
let initiator = &nodes[0];
@@ -1926,8 +1923,7 @@ fn fail_splice_on_interactive_tx_error() {
19261923
fn fail_splice_on_tx_abort() {
19271924
let chanmon_cfgs = create_chanmon_cfgs(2);
19281925
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1929-
let config = test_default_channel_config();
1930-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
1926+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
19311927
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
19321928

19331929
let initiator = &nodes[0];
@@ -1980,8 +1976,7 @@ fn fail_splice_on_tx_abort() {
19801976
fn fail_splice_on_channel_close() {
19811977
let chanmon_cfgs = create_chanmon_cfgs(2);
19821978
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1983-
let config = test_default_channel_config();
1984-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
1979+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
19851980
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
19861981

19871982
let initiator = &nodes[0];
@@ -2031,8 +2026,7 @@ fn fail_splice_on_channel_close() {
20312026
fn fail_quiescent_action_on_channel_close() {
20322027
let chanmon_cfgs = create_chanmon_cfgs(2);
20332028
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
2034-
let config = test_default_channel_config();
2035-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
2029+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
20362030
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
20372031

20382032
let initiator = &nodes[0];

0 commit comments

Comments
 (0)