Skip to content

Commit 9a83d1f

Browse files
committed
f rename to make it look less like a typo
1 parent 07883fe commit 9a83d1f

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

lightning/src/ln/offers_tests.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn check_compact_path_introduction_node<'a, 'b, 'c>(
163163
&& matches!(path.introduction_node(), IntroductionNode::DirectedShortChannelId(..))
164164
}
165165

166-
fn check_dummy_hopd_path_length<'a, 'b, 'c>(
166+
fn check_dummy_hopped_path_length<'a, 'b, 'c>(
167167
path: &BlindedMessagePath,
168168
lookup_node: &Node<'a, 'b, 'c>,
169169
expected_introduction_node: PublicKey,
@@ -494,7 +494,7 @@ fn check_dummy_hop_pattern_in_offer() {
494494

495495
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
496496
assert_ne!(invoice_request.payer_signing_pubkey(), bob_id);
497-
assert!(check_dummy_hopd_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
497+
assert!(check_dummy_hopped_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
498498

499499
// Case 2: NodeIdMessageRouter → uses node ID-based blinded paths
500500
// Expected: Also padded to QR_CODED_DUMMY_HOPS_PATH_LENGTH for QR code size optimization
@@ -516,7 +516,7 @@ fn check_dummy_hop_pattern_in_offer() {
516516

517517
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
518518
assert_ne!(invoice_request.payer_signing_pubkey(), bob_id);
519-
assert!(check_dummy_hopd_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
519+
assert!(check_dummy_hopped_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
520520
}
521521

522522
/// Checks that blinded paths are compact for short-lived offers.
@@ -701,7 +701,7 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
701701
});
702702
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
703703
assert_ne!(invoice_request.payer_signing_pubkey(), david_id);
704-
assert!(check_dummy_hopd_path_length(&reply_path, bob, charlie_id, DUMMY_HOPS_PATH_LENGTH));
704+
assert!(check_dummy_hopped_path_length(&reply_path, bob, charlie_id, DUMMY_HOPS_PATH_LENGTH));
705705

706706
let onion_message = alice.onion_messenger.next_onion_message_for_peer(charlie_id).unwrap();
707707
charlie.onion_messenger.handle_onion_message(alice_id, &onion_message);
@@ -720,8 +720,8 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
720720
// to Alice when she's handling the message. Therefore, either Bob or Charlie could
721721
// serve as the introduction node for the reply path back to Alice.
722722
assert!(
723-
check_dummy_hopd_path_length(&reply_path, david, bob_id, DUMMY_HOPS_PATH_LENGTH) ||
724-
check_dummy_hopd_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH)
723+
check_dummy_hopped_path_length(&reply_path, david, bob_id, DUMMY_HOPS_PATH_LENGTH) ||
724+
check_dummy_hopped_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH)
725725
);
726726

727727
route_bolt12_payment(david, &[charlie, bob, alice], &invoice);
@@ -804,7 +804,7 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
804804
for path in invoice.payment_paths() {
805805
assert_eq!(path.introduction_node(), &IntroductionNode::NodeId(bob_id));
806806
}
807-
assert!(check_dummy_hopd_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
807+
assert!(check_dummy_hopped_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
808808

809809
route_bolt12_payment(david, &[charlie, bob, alice], &invoice);
810810
expect_recent_payment!(david, RecentPaymentDetails::Pending, payment_id);
@@ -859,7 +859,7 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
859859
});
860860
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
861861
assert_ne!(invoice_request.payer_signing_pubkey(), bob_id);
862-
assert!(check_dummy_hopd_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
862+
assert!(check_dummy_hopped_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
863863

864864
let onion_message = alice.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
865865
bob.onion_messenger.handle_onion_message(alice_id, &onion_message);
@@ -871,7 +871,7 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
871871
for path in invoice.payment_paths() {
872872
assert_eq!(path.introduction_node(), &IntroductionNode::NodeId(alice_id));
873873
}
874-
assert!(check_dummy_hopd_path_length(&reply_path, bob, alice_id, DUMMY_HOPS_PATH_LENGTH));
874+
assert!(check_dummy_hopped_path_length(&reply_path, bob, alice_id, DUMMY_HOPS_PATH_LENGTH));
875875

876876
route_bolt12_payment(bob, &[alice], &invoice);
877877
expect_recent_payment!(bob, RecentPaymentDetails::Pending, payment_id);
@@ -927,7 +927,7 @@ fn creates_and_pays_for_refund_using_one_hop_blinded_path() {
927927
for path in invoice.payment_paths() {
928928
assert_eq!(path.introduction_node(), &IntroductionNode::NodeId(alice_id));
929929
}
930-
assert!(check_dummy_hopd_path_length(&reply_path, bob, alice_id, DUMMY_HOPS_PATH_LENGTH));
930+
assert!(check_dummy_hopped_path_length(&reply_path, bob, alice_id, DUMMY_HOPS_PATH_LENGTH));
931931

932932
route_bolt12_payment(bob, &[alice], &invoice);
933933
expect_recent_payment!(bob, RecentPaymentDetails::Pending, payment_id);
@@ -1104,7 +1104,7 @@ fn send_invoice_requests_with_distinct_reply_path() {
11041104
alice.onion_messenger.handle_onion_message(bob_id, &onion_message);
11051105

11061106
let (_, reply_path) = extract_invoice_request(alice, &onion_message);
1107-
assert!(check_dummy_hopd_path_length(&reply_path, alice, charlie_id, DUMMY_HOPS_PATH_LENGTH));
1107+
assert!(check_dummy_hopped_path_length(&reply_path, alice, charlie_id, DUMMY_HOPS_PATH_LENGTH));
11081108

11091109
// Send, extract and verify the second Invoice Request message
11101110
let onion_message = david.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
@@ -1114,7 +1114,7 @@ fn send_invoice_requests_with_distinct_reply_path() {
11141114
alice.onion_messenger.handle_onion_message(bob_id, &onion_message);
11151115

11161116
let (_, reply_path) = extract_invoice_request(alice, &onion_message);
1117-
assert!(check_dummy_hopd_path_length(&reply_path, alice, frank_id, DUMMY_HOPS_PATH_LENGTH));
1117+
assert!(check_dummy_hopped_path_length(&reply_path, alice, frank_id, DUMMY_HOPS_PATH_LENGTH));
11181118
}
11191119

11201120
/// This test checks that when multiple potential introduction nodes are available for the payee,
@@ -1185,7 +1185,7 @@ fn send_invoice_for_refund_with_distinct_reply_path() {
11851185
let onion_message = bob.onion_messenger.next_onion_message_for_peer(alice_id).unwrap();
11861186

11871187
let (_, reply_path) = extract_invoice(alice, &onion_message);
1188-
assert!(check_dummy_hopd_path_length(&reply_path, alice, charlie_id, DUMMY_HOPS_PATH_LENGTH));
1188+
assert!(check_dummy_hopped_path_length(&reply_path, alice, charlie_id, DUMMY_HOPS_PATH_LENGTH));
11891189

11901190
// Send, extract and verify the second Invoice Request message
11911191
let onion_message = david.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
@@ -1194,7 +1194,7 @@ fn send_invoice_for_refund_with_distinct_reply_path() {
11941194
let onion_message = bob.onion_messenger.next_onion_message_for_peer(alice_id).unwrap();
11951195

11961196
let (_, reply_path) = extract_invoice(alice, &onion_message);
1197-
assert!(check_dummy_hopd_path_length(&reply_path, alice, nodes[6].node.get_our_node_id(), DUMMY_HOPS_PATH_LENGTH));
1197+
assert!(check_dummy_hopped_path_length(&reply_path, alice, nodes[6].node.get_our_node_id(), DUMMY_HOPS_PATH_LENGTH));
11981198
}
11991199

12001200
/// Verifies that the invoice request message can be retried if it fails to reach the
@@ -1248,7 +1248,7 @@ fn creates_and_pays_for_offer_with_retry() {
12481248
});
12491249
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
12501250
assert_ne!(invoice_request.payer_signing_pubkey(), bob_id);
1251-
assert!(check_dummy_hopd_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
1251+
assert!(check_dummy_hopped_path_length(&reply_path, alice, bob_id, DUMMY_HOPS_PATH_LENGTH));
12521252
let onion_message = alice.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
12531253
bob.onion_messenger.handle_onion_message(alice_id, &onion_message);
12541254

@@ -1549,7 +1549,7 @@ fn fails_authentication_when_handling_invoice_request() {
15491549
let (invoice_request, reply_path) = extract_invoice_request(alice, &onion_message);
15501550
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
15511551
assert_ne!(invoice_request.payer_signing_pubkey(), david_id);
1552-
assert!(check_dummy_hopd_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
1552+
assert!(check_dummy_hopped_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
15531553

15541554
assert_eq!(alice.onion_messenger.next_onion_message_for_peer(charlie_id), None);
15551555

@@ -1578,7 +1578,7 @@ fn fails_authentication_when_handling_invoice_request() {
15781578
let (invoice_request, reply_path) = extract_invoice_request(alice, &onion_message);
15791579
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
15801580
assert_ne!(invoice_request.payer_signing_pubkey(), david_id);
1581-
assert!(check_dummy_hopd_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
1581+
assert!(check_dummy_hopped_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
15821582

15831583
assert_eq!(alice.onion_messenger.next_onion_message_for_peer(charlie_id), None);
15841584
}
@@ -1678,7 +1678,7 @@ fn fails_authentication_when_handling_invoice_for_offer() {
16781678
let (invoice_request, reply_path) = extract_invoice_request(alice, &onion_message);
16791679
assert_eq!(invoice_request.amount_msats(), Some(10_000_000));
16801680
assert_ne!(invoice_request.payer_signing_pubkey(), david_id);
1681-
assert!(check_dummy_hopd_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
1681+
assert!(check_dummy_hopped_path_length(&reply_path, david, charlie_id, DUMMY_HOPS_PATH_LENGTH));
16821682

16831683
let onion_message = alice.onion_messenger.next_onion_message_for_peer(charlie_id).unwrap();
16841684
charlie.onion_messenger.handle_onion_message(alice_id, &onion_message);

0 commit comments

Comments
 (0)