Skip to content

Commit 3d37394

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 c9fd3a5 commit 3d37394

13 files changed

+50
-50
lines changed

lightning/src/ln/async_signer_tests.rs

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

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

823823
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
@@ -1744,7 +1744,7 @@ where
17441744
/// let default_config = UserConfig::default();
17451745
/// let channel_manager = ChannelManager::new(
17461746
/// fee_estimator, chain_monitor, tx_broadcaster, router, message_router, logger,
1747-
/// entropy_source, node_signer, signer_provider, default_config, params, current_timestamp,
1747+
/// entropy_source, node_signer, signer_provider, default_config.clone(), params, current_timestamp,
17481748
/// );
17491749
///
17501750
/// // Restart from deserialized data
@@ -16127,7 +16127,7 @@ mod tests {
1612716127
let chanmon_cfg = create_chanmon_cfgs(2);
1612816128
let node_cfg = create_node_cfgs(2, &chanmon_cfg);
1612916129
let mut user_config = test_default_channel_config();
16130-
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config), Some(user_config)]);
16130+
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config.clone()), Some(user_config.clone())]);
1613116131
let nodes = create_network(2, &node_cfg, &node_chanmgr);
1613216132
let _ = create_announced_chan_between_nodes(&nodes, 0, 1);
1613316133
let channel = &nodes[0].node.list_channels()[0];
@@ -16214,7 +16214,7 @@ mod tests {
1621416214
let chanmon_cfg = create_chanmon_cfgs(2);
1621516215
let node_cfg = create_node_cfgs(2, &chanmon_cfg);
1621616216
let user_config = test_default_channel_config();
16217-
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config), Some(user_config)]);
16217+
let node_chanmgr = create_node_chanmgrs(2, &node_cfg, &[Some(user_config.clone()), Some(user_config)]);
1621816218
let nodes = create_network(2, &node_cfg, &node_chanmgr);
1621916219
let error_message = "Channel force-closed";
1622016220

lightning/src/ln/functional_test_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl<'a, 'b, 'c> Drop for Node<'a, 'b, 'c> {
719719
let mut w = test_utils::TestVecWriter(Vec::new());
720720
self.node.write(&mut w).unwrap();
721721
<(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 {
722-
default_config: *self.node.get_current_default_configuration(),
722+
default_config: self.node.get_current_default_configuration().clone(),
723723
entropy_source: self.keys_manager,
724724
node_signer: self.keys_manager,
725725
signer_provider: self.keys_manager,
@@ -3971,7 +3971,7 @@ pub fn create_batch_channel_funding<'a, 'b, 'c>(
39713971
let temp_chan_id = funding_node.node.create_channel(
39723972
other_node.node.get_our_node_id(), *channel_value_satoshis, *push_msat, *user_channel_id,
39733973
None,
3974-
*override_config,
3974+
override_config.clone(),
39753975
).unwrap();
39763976
let open_channel_msg = get_event_msg!(funding_node, MessageSendEvent::SendOpenChannel, other_node.node.get_our_node_id());
39773977
other_node.node.handle_open_channel(funding_node.node.get_our_node_id(), &open_channel_msg);

lightning/src/ln/functional_tests.rs

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

110110
// Instantiate channel parameters where we push the maximum msats given our
@@ -2903,7 +2903,7 @@ fn test_multiple_package_conflicts() {
29032903
user_cfg.manually_accept_inbound_channels = true;
29042904

29052905
let node_chanmgrs =
2906-
create_node_chanmgrs(3, &node_cfgs, &[Some(user_cfg), Some(user_cfg), Some(user_cfg)]);
2906+
create_node_chanmgrs(3, &node_cfgs, &[Some(user_cfg.clone()), Some(user_cfg.clone()), Some(user_cfg)]);
29072907
let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
29082908

29092909
// Since we're using anchor channels, make sure each node has a UTXO for paying fees.
@@ -10622,7 +10622,7 @@ fn test_nondust_htlc_excess_fees_are_dust() {
1062210622
config.channel_handshake_config.our_htlc_minimum_msat = 1;
1062310623
config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
1062410624

10625-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(config)]);
10625+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config.clone()), Some(config)]);
1062610626
let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
1062710627

1062810628
// Leave enough on the funder side to let it pay the mining fees for a commit tx with tons of htlcs
@@ -11810,7 +11810,7 @@ fn do_test_funding_and_commitment_tx_confirm_same_block(confirm_remote_commitmen
1181011810
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1181111811
let mut min_depth_1_block_cfg = test_default_channel_config();
1181211812
min_depth_1_block_cfg.channel_handshake_config.minimum_depth = 1;
11813-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(min_depth_1_block_cfg), Some(min_depth_1_block_cfg)]);
11813+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(min_depth_1_block_cfg.clone()), Some(min_depth_1_block_cfg)]);
1181411814
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1181511815

1181611816
let funding_tx = create_chan_between_nodes_with_value_init(&nodes[0], &nodes[1], 1_000_000, 0);
@@ -11899,7 +11899,7 @@ fn test_manual_funding_abandon() {
1189911899
cfg.channel_handshake_config.minimum_depth = 1;
1190011900
let chanmon_cfgs = create_chanmon_cfgs(2);
1190111901
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
11902-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg), Some(cfg)]);
11902+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg.clone()), Some(cfg)]);
1190311903
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1190411904

1190511905
assert!(nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100_000, 0, 42, None, None).is_ok());
@@ -11941,7 +11941,7 @@ fn test_funding_signed_event() {
1194111941
cfg.channel_handshake_config.minimum_depth = 1;
1194211942
let chanmon_cfgs = create_chanmon_cfgs(2);
1194311943
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
11944-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg), Some(cfg)]);
11944+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(cfg.clone()), Some(cfg)]);
1194511945
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1194611946

1194711947
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
@@ -939,7 +939,7 @@ mod test {
939939
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
940940
let mut config = test_default_channel_config();
941941
config.channel_handshake_config.minimum_depth = 1;
942-
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), Some(config)]);
942+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
943943
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
944944

945945
// 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
@@ -290,7 +290,7 @@ fn test_fee_failures() {
290290

291291
let chanmon_cfgs = create_chanmon_cfgs(3);
292292
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
293-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(config)]);
293+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config.clone()), Some(config)]);
294294
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
295295
let channels = [create_announced_chan_between_nodes(&nodes, 0, 1), create_announced_chan_between_nodes(&nodes, 1, 2)];
296296

@@ -346,7 +346,7 @@ fn test_onion_failure() {
346346

347347
let chanmon_cfgs = create_chanmon_cfgs(3);
348348
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
349-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config), Some(config), Some(node_2_cfg)]);
349+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[Some(config.clone()), Some(config), Some(node_2_cfg)]);
350350
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
351351
let channels = [create_announced_chan_between_nodes(&nodes, 0, 1), create_announced_chan_between_nodes(&nodes, 1, 2)];
352352
for node in nodes.iter() {
@@ -728,7 +728,7 @@ fn test_onion_failure() {
728728
fn test_overshoot_final_cltv() {
729729
let chanmon_cfgs = create_chanmon_cfgs(3);
730730
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
731-
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None; 3]);
731+
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
732732
let mut nodes = create_network(3, &node_cfgs, &node_chanmgrs);
733733
create_announced_chan_between_nodes(&nodes, 0, 1);
734734
create_announced_chan_between_nodes(&nodes, 1, 2);
@@ -892,7 +892,7 @@ fn do_test_onion_failure_stale_channel_update(announce_for_forwarding: bool) {
892892
.find(|channel| channel.channel_id == channel_to_update.0).unwrap()
893893
.config.unwrap();
894894
config.forwarding_fee_base_msat = u32::max_value();
895-
let msg = update_and_get_channel_update(&config, true, None, false).unwrap();
895+
let msg = update_and_get_channel_update(&config.clone(), true, None, false).unwrap();
896896

897897
// The old policy should still be in effect until a new block is connected.
898898
send_along_route_with_secret(&nodes[0], route.clone(), &[&[&nodes[1], &nodes[2]]], PAYMENT_AMT,
@@ -929,7 +929,7 @@ fn do_test_onion_failure_stale_channel_update(announce_for_forwarding: bool) {
929929
let config_after_restart = {
930930
let chan_1_monitor_serialized = get_monitor!(nodes[1], other_channel.3).encode();
931931
let chan_2_monitor_serialized = get_monitor!(nodes[1], channel_to_update.0).encode();
932-
reload_node!(nodes[1], *nodes[1].node.get_current_default_configuration(), &nodes[1].node.encode(),
932+
reload_node!(nodes[1], nodes[1].node.get_current_default_configuration().clone(), &nodes[1].node.encode(),
933933
&[&chan_1_monitor_serialized, &chan_2_monitor_serialized], persister, chain_monitor, channel_manager_1_deserialized);
934934
nodes[1].node.list_channels().iter()
935935
.find(|channel| channel.channel_id == channel_to_update.0).unwrap()

0 commit comments

Comments
 (0)