Skip to content

Commit 64639f3

Browse files
committed
Drop now-useless PaymentSecret parameters when claiming/failing-back
1 parent bfa0daa commit 64639f3

File tree

3 files changed

+44
-49
lines changed

3 files changed

+44
-49
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
20762076
/// along the path (including in our own channel on which we received it).
20772077
/// Returns false if no payment was found to fail backwards, true if the process of failing the
20782078
/// HTLC backwards has been started.
2079-
pub fn fail_htlc_backwards(&self, payment_hash: &PaymentHash, _payment_secret: &Option<PaymentSecret>) -> bool {
2079+
pub fn fail_htlc_backwards(&self, payment_hash: &PaymentHash) -> bool {
20802080
let _persistence_guard = PersistenceNotifierGuard::new(&self.total_consistency_lock, &self.persistence_notifier);
20812081

20822082
let mut channel_state = Some(self.channel_state.lock().unwrap());
@@ -2245,18 +2245,13 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
22452245
/// generating message events for the net layer to claim the payment, if possible. Thus, you
22462246
/// should probably kick the net layer to go send messages if this returns true!
22472247
///
2248-
/// You must specify the expected amounts for this HTLC, and we will only claim HTLCs
2249-
/// available within a few percent of the expected amount. This is critical for several
2250-
/// reasons : a) it avoids providing senders with `proof-of-payment` (in the form of the
2251-
/// payment_preimage without having provided the full value and b) it avoids certain
2252-
/// privacy-breaking recipient-probing attacks which may reveal payment activity to
2253-
/// motivated attackers.
2254-
///
2255-
/// Note that the privacy concerns in (b) are not relevant in payments with a payment_secret
2256-
/// set. Thus, for such payments we will claim any payments which do not under-pay.
2248+
/// Note that if you did not set an `amount_msat` when calling [`get_payment_secret`] or
2249+
/// [`get_payment_secret_preimage`] you must check that the amount in the `PaymentReceived`
2250+
/// event matches your expectation. If you fail to do so and call this method, you may provide
2251+
/// the sender "proof-of-payment" when they did not fulfill the full expected payment.
22572252
///
22582253
/// May panic if called except in response to a PaymentReceived event.
2259-
pub fn claim_funds(&self, payment_preimage: PaymentPreimage, _payment_secret: &Option<PaymentSecret>, expected_amount: u64) -> bool {
2254+
pub fn claim_funds(&self, payment_preimage: PaymentPreimage, expected_amount: u64) -> bool {
22602255
let payment_hash = PaymentHash(Sha256::hash(&payment_preimage.0).into_inner());
22612256

22622257
let _persistence_guard = PersistenceNotifierGuard::new(&self.total_consistency_lock, &self.persistence_notifier);

lightning/src/ln/functional_test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ pub fn send_payment<'a, 'b, 'c>(origin: &Node<'a, 'b, 'c>, expected_route: &[&No
11761176
}
11771177

11781178
pub fn fail_payment_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: &[&Node<'a, 'b, 'c>], skip_last: bool, our_payment_hash: PaymentHash) {
1179-
assert!(expected_route.last().unwrap().node.fail_htlc_backwards(&our_payment_hash, &None));
1179+
assert!(expected_route.last().unwrap().node.fail_htlc_backwards(&our_payment_hash));
11801180
expect_pending_htlcs_forwardable!(expected_route.last().unwrap());
11811181
check_added_monitors!(expected_route.last().unwrap(), 1);
11821182

lightning/src/ln/functional_tests.rs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ fn updates_shutdown_wait() {
873873
unwrap_send_err!(nodes[0].node.send_payment(&route_1, payment_hash, &Some(payment_secret)), true, APIError::ChannelUnavailable {..}, {});
874874
unwrap_send_err!(nodes[1].node.send_payment(&route_2, payment_hash, &Some(payment_secret)), true, APIError::ChannelUnavailable {..}, {});
875875

876-
assert!(nodes[2].node.claim_funds(our_payment_preimage, &Some(payment_secret), 100_000));
876+
assert!(nodes[2].node.claim_funds(our_payment_preimage, 100_000));
877877
check_added_monitors!(nodes[2], 1);
878878
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
879879
assert!(updates.update_add_htlcs.is_empty());
@@ -1007,7 +1007,7 @@ fn do_test_shutdown_rebroadcast(recv_count: u8) {
10071007
let chan_1 = create_announced_chan_between_nodes(&nodes, 0, 1, InitFeatures::known(), InitFeatures::known());
10081008
let chan_2 = create_announced_chan_between_nodes(&nodes, 1, 2, InitFeatures::known(), InitFeatures::known());
10091009

1010-
let (our_payment_preimage, _, our_payment_secret) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100000);
1010+
let (our_payment_preimage, _, _) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100000);
10111011

10121012
nodes[1].node.close_channel(&chan_1.2).unwrap();
10131013
let node_1_shutdown = get_event_msg!(nodes[1], MessageSendEvent::SendShutdown, nodes[0].node.get_our_node_id());
@@ -1046,7 +1046,7 @@ fn do_test_shutdown_rebroadcast(recv_count: u8) {
10461046
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
10471047
assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
10481048

1049-
assert!(nodes[2].node.claim_funds(our_payment_preimage, &Some(our_payment_secret), 100_000));
1049+
assert!(nodes[2].node.claim_funds(our_payment_preimage, 100_000));
10501050
check_added_monitors!(nodes[2], 1);
10511051
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
10521052
assert!(updates.update_add_htlcs.is_empty());
@@ -1453,7 +1453,7 @@ fn duplicate_htlc_test() {
14531453
fn test_duplicate_htlc_different_direction_onchain() {
14541454
// Test that ChannelMonitor doesn't generate 2 preimage txn
14551455
// when we have 2 HTLCs with same preimage that go across a node
1456-
// in opposite directions.
1456+
// in opposite directions, even with the same payment secret.
14571457
let chanmon_cfgs = create_chanmon_cfgs(2);
14581458
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
14591459
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
@@ -1465,15 +1465,15 @@ fn test_duplicate_htlc_different_direction_onchain() {
14651465
// balancing
14661466
send_payment(&nodes[0], &vec!(&nodes[1])[..], 8000000, 8_000_000);
14671467

1468-
let (payment_preimage, payment_hash, payment_secret) = route_payment(&nodes[0], &vec!(&nodes[1])[..], 900_000);
1468+
let (payment_preimage, payment_hash, _) = route_payment(&nodes[0], &vec!(&nodes[1])[..], 900_000);
14691469

14701470
let net_graph_msg_handler = &nodes[1].net_graph_msg_handler;
14711471
let route = get_route(&nodes[1].node.get_our_node_id(), &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[0].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 800_000, TEST_FINAL_CLTV, &logger).unwrap();
14721472
let node_a_payment_secret = nodes[0].node.get_payment_secret(payment_hash, None, 1008).unwrap();
14731473
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[0]]], 800_000, payment_hash, node_a_payment_secret);
14741474

14751475
// Provide preimage to node 0 by claiming payment
1476-
nodes[0].node.claim_funds(payment_preimage, &Some(payment_secret), 800_000);
1476+
nodes[0].node.claim_funds(payment_preimage, 800_000);
14771477
check_added_monitors!(nodes[0], 1);
14781478

14791479
// Broadcast node 1 commitment txn
@@ -2153,13 +2153,13 @@ fn channel_reserve_in_flight_removes() {
21532153

21542154
// Now claim both of the first two HTLCs on B's end, putting B in AwaitingRAA and generating an
21552155
// initial fulfill/CS.
2156-
assert!(nodes[1].node.claim_funds(payment_preimage_1, &None, b_chan_values.channel_reserve_msat - b_chan_values.value_to_self_msat - 10000));
2156+
assert!(nodes[1].node.claim_funds(payment_preimage_1, b_chan_values.channel_reserve_msat - b_chan_values.value_to_self_msat - 10000));
21572157
check_added_monitors!(nodes[1], 1);
21582158
let bs_removes = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
21592159

21602160
// This claim goes in B's holding cell, allowing us to have a pending B->A RAA which does not
21612161
// remove the second HTLC when we send the HTLC back from B to A.
2162-
assert!(nodes[1].node.claim_funds(payment_preimage_2, &None, 20000));
2162+
assert!(nodes[1].node.claim_funds(payment_preimage_2, 20000));
21632163
check_added_monitors!(nodes[1], 1);
21642164
assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
21652165

@@ -2319,7 +2319,7 @@ fn channel_monitor_network_test() {
23192319
macro_rules! claim_funds {
23202320
($node: expr, $prev_node: expr, $preimage: expr, $amount: expr) => {
23212321
{
2322-
assert!($node.node.claim_funds($preimage, &None, $amount));
2322+
assert!($node.node.claim_funds($preimage, $amount));
23232323
check_added_monitors!($node, 1);
23242324

23252325
let events = $node.node.get_and_clear_pending_msg_events();
@@ -2743,8 +2743,8 @@ fn test_htlc_on_chain_success() {
27432743
let commitment_tx = get_local_commitment_txn!(nodes[2], chan_2.2);
27442744
assert_eq!(commitment_tx.len(), 1);
27452745
check_spends!(commitment_tx[0], chan_2.3);
2746-
nodes[2].node.claim_funds(our_payment_preimage, &None, 3_000_000);
2747-
nodes[2].node.claim_funds(our_payment_preimage_2, &None, 3_000_000);
2746+
nodes[2].node.claim_funds(our_payment_preimage, 3_000_000);
2747+
nodes[2].node.claim_funds(our_payment_preimage_2, 3_000_000);
27482748
check_added_monitors!(nodes[2], 2);
27492749
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
27502750
assert!(updates.update_add_htlcs.is_empty());
@@ -2921,7 +2921,7 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) {
29212921
// Broadcast legit commitment tx from C on B's chain
29222922
let commitment_tx = get_local_commitment_txn!(nodes[2], chan_2.2);
29232923
check_spends!(commitment_tx[0], chan_2.3);
2924-
nodes[2].node.fail_htlc_backwards(&payment_hash, &None);
2924+
nodes[2].node.fail_htlc_backwards(&payment_hash);
29252925
check_added_monitors!(nodes[2], 0);
29262926
expect_pending_htlcs_forwardable!(nodes[2]);
29272927
check_added_monitors!(nodes[2], 1);
@@ -3123,7 +3123,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
31233123
let (_, second_payment_hash, _) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], value);
31243124
let (_, third_payment_hash, _) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], value);
31253125

3126-
assert!(nodes[2].node.fail_htlc_backwards(&first_payment_hash, &None));
3126+
assert!(nodes[2].node.fail_htlc_backwards(&first_payment_hash));
31273127
expect_pending_htlcs_forwardable!(nodes[2]);
31283128
check_added_monitors!(nodes[2], 1);
31293129
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
@@ -3136,7 +3136,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
31363136
let bs_raa = commitment_signed_dance!(nodes[1], nodes[2], updates.commitment_signed, false, true, false, true);
31373137
// Drop the last RAA from 3 -> 2
31383138

3139-
assert!(nodes[2].node.fail_htlc_backwards(&second_payment_hash, &None));
3139+
assert!(nodes[2].node.fail_htlc_backwards(&second_payment_hash));
31403140
expect_pending_htlcs_forwardable!(nodes[2]);
31413141
check_added_monitors!(nodes[2], 1);
31423142
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
@@ -3153,7 +3153,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
31533153
nodes[2].node.handle_revoke_and_ack(&nodes[1].node.get_our_node_id(), &as_raa);
31543154
check_added_monitors!(nodes[2], 1);
31553155

3156-
assert!(nodes[2].node.fail_htlc_backwards(&third_payment_hash, &None));
3156+
assert!(nodes[2].node.fail_htlc_backwards(&third_payment_hash));
31573157
expect_pending_htlcs_forwardable!(nodes[2]);
31583158
check_added_monitors!(nodes[2], 1);
31593159
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
@@ -3653,7 +3653,7 @@ fn do_test_drop_messages_peer_disconnect(messages_delivered: u8) {
36533653
_ => panic!("Unexpected event"),
36543654
}
36553655

3656-
nodes[1].node.claim_funds(payment_preimage_1, &None, 1_000_000);
3656+
nodes[1].node.claim_funds(payment_preimage_1, 1_000_000);
36573657
check_added_monitors!(nodes[1], 1);
36583658

36593659
let events_3 = nodes[1].node.get_and_clear_pending_msg_events();
@@ -3879,7 +3879,7 @@ fn test_drop_messages_peer_disconnect_dual_htlc() {
38793879
_ => panic!("Unexpected event"),
38803880
}
38813881

3882-
assert!(nodes[1].node.claim_funds(payment_preimage_1, &None, 1_000_000));
3882+
assert!(nodes[1].node.claim_funds(payment_preimage_1, 1_000_000));
38833883
check_added_monitors!(nodes[1], 1);
38843884

38853885
let events_2 = nodes[1].node.get_and_clear_pending_msg_events();
@@ -4734,7 +4734,7 @@ fn test_static_spendable_outputs_preimage_tx() {
47344734
assert_eq!(commitment_tx[0].input[0].previous_output.txid, chan_1.3.txid());
47354735

47364736
// Settle A's commitment tx on B's chain
4737-
assert!(nodes[1].node.claim_funds(payment_preimage, &None, 3_000_000));
4737+
assert!(nodes[1].node.claim_funds(payment_preimage, 3_000_000));
47384738
check_added_monitors!(nodes[1], 1);
47394739
mine_transaction(&nodes[1], &commitment_tx[0]);
47404740
check_added_monitors!(nodes[1], 1);
@@ -5015,7 +5015,7 @@ fn test_onchain_to_onchain_claim() {
50155015
let (payment_preimage, _payment_hash, _payment_secret) = route_payment(&nodes[0], &vec!(&nodes[1], &nodes[2]), 3000000);
50165016
let commitment_tx = get_local_commitment_txn!(nodes[2], chan_2.2);
50175017
check_spends!(commitment_tx[0], chan_2.3);
5018-
nodes[2].node.claim_funds(payment_preimage, &None, 3_000_000);
5018+
nodes[2].node.claim_funds(payment_preimage, 3_000_000);
50195019
check_added_monitors!(nodes[2], 1);
50205020
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
50215021
assert!(updates.update_add_htlcs.is_empty());
@@ -5140,7 +5140,7 @@ fn test_duplicate_payment_hash_one_failure_one_success() {
51405140
htlc_timeout_tx = node_txn[1].clone();
51415141
}
51425142

5143-
nodes[2].node.claim_funds(our_payment_preimage, &None, 900_000);
5143+
nodes[2].node.claim_funds(our_payment_preimage, 900_000);
51445144
mine_transaction(&nodes[2], &commitment_txn[0]);
51455145
check_added_monitors!(nodes[2], 2);
51465146
let events = nodes[2].node.get_and_clear_pending_msg_events();
@@ -5231,7 +5231,7 @@ fn test_dynamic_spendable_outputs_local_htlc_success_tx() {
52315231
check_spends!(local_txn[0], chan_1.3);
52325232

52335233
// Give B knowledge of preimage to be able to generate a local HTLC-Success Tx
5234-
nodes[1].node.claim_funds(payment_preimage, &None, 9_000_000);
5234+
nodes[1].node.claim_funds(payment_preimage, 9_000_000);
52355235
check_added_monitors!(nodes[1], 1);
52365236
mine_transaction(&nodes[1], &local_txn[0]);
52375237
check_added_monitors!(nodes[1], 1);
@@ -5336,10 +5336,10 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
53365336

53375337
// Now fail back three of the over-dust-limit and three of the under-dust-limit payments in one go.
53385338
// Fail 0th below-dust, 4th above-dust, 8th above-dust, 10th below-dust HTLCs
5339-
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_1, &None));
5340-
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_3, &None));
5341-
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_5, &None));
5342-
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_6, &None));
5339+
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_1));
5340+
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_3));
5341+
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_5));
5342+
assert!(nodes[4].node.fail_htlc_backwards(&payment_hash_6));
53435343
check_added_monitors!(nodes[4], 0);
53445344
expect_pending_htlcs_forwardable!(nodes[4]);
53455345
check_added_monitors!(nodes[4], 1);
@@ -5352,8 +5352,8 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
53525352
commitment_signed_dance!(nodes[3], nodes[4], four_removes.commitment_signed, false);
53535353

53545354
// Fail 3rd below-dust and 7th above-dust HTLCs
5355-
assert!(nodes[5].node.fail_htlc_backwards(&payment_hash_2, &None));
5356-
assert!(nodes[5].node.fail_htlc_backwards(&payment_hash_4, &None));
5355+
assert!(nodes[5].node.fail_htlc_backwards(&payment_hash_2));
5356+
assert!(nodes[5].node.fail_htlc_backwards(&payment_hash_4));
53575357
check_added_monitors!(nodes[5], 0);
53585358
expect_pending_htlcs_forwardable!(nodes[5]);
53595359
check_added_monitors!(nodes[5], 1);
@@ -5666,7 +5666,7 @@ fn do_htlc_claim_local_commitment_only(use_dust: bool) {
56665666

56675667
// Claim the payment, but don't deliver A's commitment_signed, resulting in the HTLC only being
56685668
// present in B's local commitment transaction, but none of A's commitment transactions.
5669-
assert!(nodes[1].node.claim_funds(our_payment_preimage, &None, if use_dust { 50_000 } else { 3_000_000 }));
5669+
assert!(nodes[1].node.claim_funds(our_payment_preimage, if use_dust { 50_000 } else { 3_000_000 }));
56705670
check_added_monitors!(nodes[1], 1);
56715671

56725672
let bs_updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
@@ -5745,7 +5745,7 @@ fn do_htlc_claim_previous_remote_commitment_only(use_dust: bool, check_revoke_no
57455745
// actually revoked.
57465746
let htlc_value = if use_dust { 50000 } else { 3000000 };
57475747
let (_, our_payment_hash, _) = route_payment(&nodes[0], &[&nodes[1]], htlc_value);
5748-
assert!(nodes[1].node.fail_htlc_backwards(&our_payment_hash, &None));
5748+
assert!(nodes[1].node.fail_htlc_backwards(&our_payment_hash));
57495749
expect_pending_htlcs_forwardable!(nodes[1]);
57505750
check_added_monitors!(nodes[1], 1);
57515751

@@ -6059,7 +6059,7 @@ fn test_free_and_fail_holding_cell_htlcs() {
60596059
Event::PaymentReceived { .. } => {},
60606060
_ => panic!("Unexpected event"),
60616061
}
6062-
nodes[1].node.claim_funds(payment_preimage_1, &None, amt_1);
6062+
nodes[1].node.claim_funds(payment_preimage_1, amt_1);
60636063
check_added_monitors!(nodes[1], 1);
60646064
let update_msgs = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
60656065
nodes[0].node.handle_update_fulfill_htlc(&nodes[1].node.get_our_node_id(), &update_msgs.update_fulfill_htlcs[0]);
@@ -6702,7 +6702,7 @@ fn test_update_fulfill_htlc_bolt2_incorrect_htlc_id() {
67026702

67036703
let our_payment_preimage = route_payment(&nodes[0], &[&nodes[1]], 100000).0;
67046704

6705-
nodes[1].node.claim_funds(our_payment_preimage, &None, 100_000);
6705+
nodes[1].node.claim_funds(our_payment_preimage, 100_000);
67066706
check_added_monitors!(nodes[1], 1);
67076707

67086708
let events = nodes[1].node.get_and_clear_pending_msg_events();
@@ -6743,7 +6743,7 @@ fn test_update_fulfill_htlc_bolt2_wrong_preimage() {
67436743

67446744
let our_payment_preimage = route_payment(&nodes[0], &[&nodes[1]], 100000).0;
67456745

6746-
nodes[1].node.claim_funds(our_payment_preimage, &None, 100_000);
6746+
nodes[1].node.claim_funds(our_payment_preimage, 100_000);
67476747
check_added_monitors!(nodes[1], 1);
67486748

67496749
let events = nodes[1].node.get_and_clear_pending_msg_events();
@@ -6923,7 +6923,7 @@ fn do_test_failure_delay_dust_htlc_local_commitment(announce_latest: bool) {
69236923
let as_prev_commitment_tx = get_local_commitment_txn!(nodes[0], chan.2);
69246924

69256925
// Fail one HTLC to prune it in the will-be-latest-local commitment tx
6926-
assert!(nodes[1].node.fail_htlc_backwards(&payment_hash_2, &None));
6926+
assert!(nodes[1].node.fail_htlc_backwards(&payment_hash_2));
69276927
check_added_monitors!(nodes[1], 0);
69286928
expect_pending_htlcs_forwardable!(nodes[1]);
69296929
check_added_monitors!(nodes[1], 1);
@@ -7488,7 +7488,7 @@ fn test_check_htlc_underpaying() {
74887488

74897489
// Node 3 is expecting payment of 100_000 but receive 10_000,
74907490
// fail htlc like we didn't know the preimage.
7491-
nodes[1].node.claim_funds(payment_preimage, &None, 100_000);
7491+
nodes[1].node.claim_funds(payment_preimage, 100_000);
74927492
nodes[1].node.process_pending_htlc_forwards();
74937493

74947494
let events = nodes[1].node.get_and_clear_pending_msg_events();
@@ -7871,7 +7871,7 @@ fn test_bump_penalty_txn_on_remote_commitment() {
78717871
assert_eq!(remote_txn[0].input[0].previous_output.txid, chan.3.txid());
78727872

78737873
// Claim a HTLC without revocation (provide B monitor with preimage)
7874-
nodes[1].node.claim_funds(payment_preimage, &None, 3_000_000);
7874+
nodes[1].node.claim_funds(payment_preimage, 3_000_000);
78757875
mine_transaction(&nodes[1], &remote_txn[0]);
78767876
check_added_monitors!(nodes[1], 2);
78777877

@@ -8151,7 +8151,7 @@ fn test_update_err_monitor_lockdown() {
81518151
watchtower.chain_monitor.block_connected(&header, &[], 200);
81528152

81538153
// Try to update ChannelMonitor
8154-
assert!(nodes[1].node.claim_funds(preimage, &None, 9_000_000));
8154+
assert!(nodes[1].node.claim_funds(preimage, 9_000_000));
81558155
check_added_monitors!(nodes[1], 1);
81568156
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
81578157
assert_eq!(updates.update_fulfill_htlcs.len(), 1);
@@ -8428,7 +8428,7 @@ fn do_test_onchain_htlc_settlement_after_close(broadcast_alice: bool, go_onchain
84288428
// Step (5):
84298429
// Carol then claims the funds and sends an update_fulfill message to Bob, and they go through the
84308430
// process of removing the HTLC from their commitment transactions.
8431-
assert!(nodes[2].node.claim_funds(payment_preimage, &None, 3_000_000));
8431+
assert!(nodes[2].node.claim_funds(payment_preimage, 3_000_000));
84328432
check_added_monitors!(nodes[2], 1);
84338433
let carol_updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
84348434
assert!(carol_updates.update_add_htlcs.is_empty());

0 commit comments

Comments
 (0)