Skip to content

Commit 183b337

Browse files
Remove Copy implementation from UserConfig
We need to add a Vec to the config as part of async receive support, see upcoming commits. The vec will contain blinded paths to reach an always-online node that will serve static invoices on our behalf. None of those things implement Copy so remove support for the trait.
1 parent 030a784 commit 183b337

13 files changed

+51
-51
lines changed

lightning/src/ln/async_signer_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ fn do_test_async_holder_signatures(anchors: bool, remote_commitment: bool) {
816816

817817
let chanmon_cfgs = create_chanmon_cfgs(2);
818818
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
819-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), Some(config)]);
819+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
820820
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
821821

822822
let closing_node = if remote_commitment { &nodes[1] } else { &nodes[0] };

lightning/src/ln/chanmon_update_fail_tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,7 @@ fn test_temporary_error_during_shutdown() {
25912591

25922592
let chanmon_cfgs = create_chanmon_cfgs(2);
25932593
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
2594-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), Some(config)]);
2594+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
25952595
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
25962596

25972597
let (_, _, channel_id, funding_tx) = create_announced_chan_between_nodes(&nodes, 0, 1);
@@ -2762,7 +2762,7 @@ fn do_test_outbound_reload_without_init_mon(use_0conf: bool) {
27622762
chan_config.manually_accept_inbound_channels = true;
27632763
chan_config.channel_handshake_limits.trust_own_funding_0conf = true;
27642764

2765-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(chan_config), Some(chan_config)]);
2765+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(chan_config.clone()), Some(chan_config)]);
27662766
let nodes_0_deserialized;
27672767

27682768
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
@@ -2853,7 +2853,7 @@ fn do_test_inbound_reload_without_init_mon(use_0conf: bool, lock_commitment: boo
28532853
chan_config.manually_accept_inbound_channels = true;
28542854
chan_config.channel_handshake_limits.trust_own_funding_0conf = true;
28552855

2856-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(chan_config), Some(chan_config)]);
2856+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(chan_config.clone()), Some(chan_config)]);
28572857
let nodes_1_deserialized;
28582858

28592859
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);

lightning/src/ln/channelmanager.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ where
17281728
/// let default_config = UserConfig::default();
17291729
/// let channel_manager = ChannelManager::new(
17301730
/// fee_estimator, chain_monitor, tx_broadcaster, router, message_router, logger,
1731-
/// entropy_source, node_signer, signer_provider, default_config, params, current_timestamp,
1731+
/// entropy_source, node_signer, signer_provider, default_config.clone(), params, current_timestamp,
17321732
/// );
17331733
///
17341734
/// // Restart from deserialized data
@@ -16120,7 +16120,7 @@ mod tests {
1612016120
let chanmon_cfg = create_chanmon_cfgs(2);
1612116121
let node_cfg = create_node_cfgs(2, &chanmon_cfg);
1612216122
let mut user_config = test_default_channel_config();
16123-
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config), Some(user_config)]);
16123+
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config.clone()), Some(user_config.clone())]);
1612416124
let nodes = create_network(2, &node_cfg, &node_chanmgr);
1612516125
let _ = create_announced_chan_between_nodes(&nodes, 0, 1);
1612616126
let channel = &nodes[0].node.list_channels()[0];
@@ -16207,7 +16207,7 @@ mod tests {
1620716207
let chanmon_cfg = create_chanmon_cfgs(2);
1620816208
let node_cfg = create_node_cfgs(2, &chanmon_cfg);
1620916209
let user_config = test_default_channel_config();
16210-
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config), Some(user_config)]);
16210+
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config.clone()), Some(user_config)]);
1621116211
let nodes = create_network(2, &node_cfg, &node_chanmgr);
1621216212
let error_message = "Channel force-closed";
1621316213

lightning/src/ln/functional_test_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ impl<'a, 'b, 'c> Drop for Node<'a, 'b, 'c> {
716716
let mut w = test_utils::TestVecWriter(Vec::new());
717717
self.node.write(&mut w).unwrap();
718718
<(BlockHash, ChannelManager<&test_utils::TestChainMonitor, &test_utils::TestBroadcaster, &test_utils::TestKeysInterface, &test_utils::TestKeysInterface, &test_utils::TestKeysInterface, &test_utils::TestFeeEstimator, &test_utils::TestRouter, &test_utils::TestMessageRouter, &test_utils::TestLogger>)>::read(&mut io::Cursor::new(w.0), ChannelManagerReadArgs {
719-
default_config: *self.node.get_current_default_configuration(),
719+
default_config: self.node.get_current_default_configuration().clone(),
720720
entropy_source: self.keys_manager,
721721
node_signer: self.keys_manager,
722722
signer_provider: self.keys_manager,
@@ -3979,7 +3979,7 @@ pub fn create_batch_channel_funding<'a, 'b, 'c>(
39793979
let temp_chan_id = funding_node.node.create_channel(
39803980
other_node.node.get_our_node_id(), *channel_value_satoshis, *push_msat, *user_channel_id,
39813981
None,
3982-
*override_config,
3982+
override_config.clone(),
39833983
).unwrap();
39843984
let open_channel_msg = get_event_msg!(funding_node, MessageSendEvent::SendOpenChannel, other_node.node.get_our_node_id());
39853985
other_node.node.handle_open_channel(funding_node.node.get_our_node_id(), &open_channel_msg);

lightning/src/ln/functional_tests.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub fn test_insane_channel_opens() {
105105
cfg.channel_handshake_limits.max_funding_satoshis = TOTAL_BITCOIN_SUPPLY_SATOSHIS + 1;
106106
let chanmon_cfgs = create_chanmon_cfgs(2);
107107
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
108-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, Some(cfg)]);
108+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, Some(cfg.clone())]);
109109
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
110110

111111
// Instantiate channel parameters where we push the maximum msats given our
@@ -800,7 +800,7 @@ pub fn test_update_fee_that_saturates_subs() {
800800

801801
let chanmon_cfgs = create_chanmon_cfgs(2);
802802
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
803-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(default_config), Some(default_config)]);
803+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(default_config.clone()), Some(default_config)]);
804804
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
805805

806806
let chan_id = create_chan_between_nodes_with_value(&nodes[0], &nodes[1], 10_000, 8_500_000).3;
@@ -2966,7 +2966,7 @@ pub fn test_multiple_package_conflicts() {
29662966
user_cfg.manually_accept_inbound_channels = true;
29672967

29682968
let node_chanmgrs =
2969-
create_node_chanmgrs(3, &node_cfgs, &[Some(user_cfg), Some(user_cfg), Some(user_cfg)]);
2969+
create_node_chanmgrs(3, &node_cfgs, &[Some(user_cfg.clone()), Some(user_cfg.clone()), Some(user_cfg)]);
29702970
let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
29712971

29722972
// Since we're using anchor channels, make sure each node has a UTXO for paying fees.
@@ -10669,7 +10669,7 @@ pub fn test_nondust_htlc_excess_fees_are_dust() {
1066910669
config.channel_handshake_config.our_htlc_minimum_msat = 1;
1067010670
config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
1067110671

10672-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(config)]);
10672+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config.clone()), Some(config)]);
1067310673
let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
1067410674

1067510675
// Leave enough on the funder side to let it pay the mining fees for a commit tx with tons of htlcs
@@ -11857,7 +11857,7 @@ fn do_test_funding_and_commitment_tx_confirm_same_block(confirm_remote_commitmen
1185711857
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1185811858
let mut min_depth_1_block_cfg = test_default_channel_config();
1185911859
min_depth_1_block_cfg.channel_handshake_config.minimum_depth = 1;
11860-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(min_depth_1_block_cfg), Some(min_depth_1_block_cfg)]);
11860+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(min_depth_1_block_cfg.clone()), Some(min_depth_1_block_cfg)]);
1186111861
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1186211862

1186311863
let funding_tx = create_chan_between_nodes_with_value_init(&nodes[0], &nodes[1], 1_000_000, 0);
@@ -11946,7 +11946,7 @@ pub fn test_manual_funding_abandon() {
1194611946
cfg.channel_handshake_config.minimum_depth = 1;
1194711947
let chanmon_cfgs = create_chanmon_cfgs(2);
1194811948
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
11949-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg), Some(cfg)]);
11949+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg.clone()), Some(cfg)]);
1195011950
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1195111951

1195211952
assert!(nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100_000, 0, 42, None, None).is_ok());
@@ -11988,7 +11988,7 @@ pub fn test_funding_signed_event() {
1198811988
cfg.channel_handshake_config.minimum_depth = 1;
1198911989
let chanmon_cfgs = create_chanmon_cfgs(2);
1199011990
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
11991-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg), Some(cfg)]);
11991+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg.clone()), Some(cfg)]);
1199211992
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1199311993

1199411994
assert!(nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100_000, 0, 42, None, None).is_ok());

lightning/src/ln/invoice_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ mod test {
934934
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
935935
let mut config = test_default_channel_config();
936936
config.channel_handshake_config.minimum_depth = 1;
937-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), Some(config)]);
937+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
938938
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
939939

940940
// Create a private channel with lots of capacity and a lower value public channel (without

lightning/src/ln/monitor_tests.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fn archive_fully_resolved_monitors() {
171171
let chanmon_cfgs = create_chanmon_cfgs(2);
172172
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
173173
let mut user_config = test_default_channel_config();
174-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
174+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
175175
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
176176

177177
let (_, _, chan_id, funding_tx) =
@@ -315,7 +315,7 @@ fn do_chanmon_claim_value_coop_close(anchors: bool) {
315315
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
316316
user_config.manually_accept_inbound_channels = true;
317317
}
318-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
318+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
319319
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
320320

321321
let (_, _, chan_id, funding_tx) =
@@ -459,7 +459,7 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
459459
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
460460
user_config.manually_accept_inbound_channels = true;
461461
}
462-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
462+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
463463
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
464464

465465
let coinbase_tx = Transaction {
@@ -862,7 +862,7 @@ fn do_test_balances_on_local_commitment_htlcs(anchors: bool) {
862862
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
863863
user_config.manually_accept_inbound_channels = true;
864864
}
865-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
865+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
866866
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
867867

868868
let coinbase_tx = Transaction {
@@ -1359,7 +1359,7 @@ fn do_test_revoked_counterparty_commitment_balances(anchors: bool, confirm_htlc_
13591359
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
13601360
user_config.manually_accept_inbound_channels = true;
13611361
}
1362-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
1362+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
13631363
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
13641364

13651365
let (_, _, chan_id, funding_tx) =
@@ -1645,7 +1645,7 @@ fn do_test_revoked_counterparty_htlc_tx_balances(anchors: bool) {
16451645
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
16461646
user_config.manually_accept_inbound_channels = true;
16471647
}
1648-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
1648+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
16491649
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
16501650

16511651
let coinbase_tx = Transaction {
@@ -1946,7 +1946,7 @@ fn do_test_revoked_counterparty_aggregated_claims(anchors: bool) {
19461946
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
19471947
user_config.manually_accept_inbound_channels = true;
19481948
}
1949-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
1949+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
19501950
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
19511951

19521952
let coinbase_tx = Transaction {
@@ -2236,7 +2236,7 @@ fn do_test_claimable_balance_correct_while_payment_pending(outbound_payment: boo
22362236
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
22372237
user_config.manually_accept_inbound_channels = true;
22382238
}
2239-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(user_config), Some(user_config), Some(user_config)]);
2239+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(user_config.clone()), Some(user_config.clone()), Some(user_config)]);
22402240
let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
22412241

22422242
let coinbase_tx = Transaction {
@@ -2401,7 +2401,7 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
24012401
config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
24022402
config.manually_accept_inbound_channels = true;
24032403
}
2404-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), Some(config)]);
2404+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
24052405
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
24062406

24072407
let (_, _, _, chan_id, funding_tx) = create_chan_between_nodes_with_value(
@@ -2533,7 +2533,7 @@ fn do_test_yield_anchors_events(have_htlcs: bool) {
25332533
anchors_config.channel_handshake_config.announce_for_forwarding = true;
25342534
anchors_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
25352535
anchors_config.manually_accept_inbound_channels = true;
2536-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(anchors_config), Some(anchors_config)]);
2536+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(anchors_config.clone()), Some(anchors_config)]);
25372537
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
25382538

25392539
let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes_with_value(
@@ -2731,7 +2731,7 @@ fn test_anchors_aggregated_revoked_htlc_tx() {
27312731
anchors_config.channel_handshake_config.announce_for_forwarding = true;
27322732
anchors_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
27332733
anchors_config.manually_accept_inbound_channels = true;
2734-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(anchors_config), Some(anchors_config)]);
2734+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(anchors_config.clone()), Some(anchors_config.clone())]);
27352735
let bob_deserialized;
27362736

27372737
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
@@ -3032,7 +3032,7 @@ fn do_test_anchors_monitor_fixes_counterparty_payment_script_on_reload(confirm_c
30323032
let mut user_config = test_default_channel_config();
30333033
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
30343034
user_config.manually_accept_inbound_channels = true;
3035-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
3035+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config.clone())]);
30363036
let node_deserialized;
30373037
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
30383038

@@ -3120,7 +3120,7 @@ fn do_test_monitor_claims_with_random_signatures(anchors: bool, confirm_counterp
31203120
user_config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
31213121
user_config.manually_accept_inbound_channels = true;
31223122
}
3123-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config), Some(user_config)]);
3123+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(user_config.clone()), Some(user_config)]);
31243124
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
31253125

31263126
let coinbase_tx = Transaction {

lightning/src/ln/onion_route_tests.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ fn test_fee_failures() {
295295

296296
let chanmon_cfgs = create_chanmon_cfgs(3);
297297
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
298-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(config)]);
298+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config.clone()), Some(config)]);
299299
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
300300
let channels = [create_announced_chan_between_nodes(&nodes, 0, 1), create_announced_chan_between_nodes(&nodes, 1, 2)];
301301

@@ -351,7 +351,7 @@ fn test_onion_failure() {
351351

352352
let chanmon_cfgs = create_chanmon_cfgs(3);
353353
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
354-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(node_2_cfg)]);
354+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config), Some(node_2_cfg)]);
355355
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
356356
let channels = [create_announced_chan_between_nodes(&nodes, 0, 1), create_announced_chan_between_nodes(&nodes, 1, 2)];
357357
for node in nodes.iter() {
@@ -756,7 +756,7 @@ fn test_onion_failure() {
756756
fn test_overshoot_final_cltv() {
757757
let chanmon_cfgs = create_chanmon_cfgs(3);
758758
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
759-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None; 3]);
759+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
760760
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
761761
create_announced_chan_between_nodes(&nodes, 0, 1);
762762
create_announced_chan_between_nodes(&nodes, 1, 2);
@@ -920,7 +920,7 @@ fn do_test_onion_failure_stale_channel_update(announce_for_forwarding: bool) {
920920
.find(|channel| channel.channel_id == channel_to_update.0).unwrap()
921921
.config.unwrap();
922922
config.forwarding_fee_base_msat = u32::max_value();
923-
let msg = update_and_get_channel_update(&config, true, None, false).unwrap();
923+
let msg = update_and_get_channel_update(&config.clone(), true, None, false).unwrap();
924924

925925
// The old policy should still be in effect until a new block is connected.
926926
send_along_route_with_secret(&nodes[0], route.clone(), &[&[&nodes[1], &nodes[2]]], PAYMENT_AMT,
@@ -957,7 +957,7 @@ fn do_test_onion_failure_stale_channel_update(announce_for_forwarding: bool) {
957957
let config_after_restart = {
958958
let chan_1_monitor_serialized = get_monitor!(nodes[1], other_channel.3).encode();
959959
let chan_2_monitor_serialized = get_monitor!(nodes[1], channel_to_update.0).encode();
960-
reload_node!(nodes[1], *nodes[1].node.get_current_default_configuration(), &nodes[1].node.encode(),
960+
reload_node!(nodes[1], nodes[1].node.get_current_default_configuration().clone(), &nodes[1].node.encode(),
961961
&[&chan_1_monitor_serialized, &chan_2_monitor_serialized], persister, chain_monitor, channel_manager_1_deserialized);
962962
nodes[1].node.list_channels().iter()
963963
.find(|channel| channel.channel_id == channel_to_update.0).unwrap()

0 commit comments

Comments
 (0)