Skip to content

Commit ed63ce6

Browse files
committed
f Clarify comments about unblinded receives
LDK does not support creating payloads to _send_ to an unblinded trampoline, which is why we need to override our payload, but it does support receiving an unblinded trampoline payload.
1 parent 527e581 commit ed63ce6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning/src/ln/blinded_payment_tests.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,7 @@ fn create_blinded_tail(
24002400
}
24012401

24022402
// Creates a replacement onion that is used to produce scenarios that we don't support, specifically
2403-
// unblinded receives and invalid payloads.
2403+
// payloads that send to unblinded receives and invalid payloads.
24042404
fn replacement_onion(
24052405
test_case: TrampolineTestCase, secp_ctx: &Secp256k1<All>, override_random_bytes: [u8; 32],
24062406
route: Route, original_amt_msat: u64, starting_htlc_offset: u32, original_trampoline_cltv: u32,
@@ -2566,7 +2566,8 @@ fn do_test_trampoline_relay(blinded: bool, test_case: TrampolineTestCase) {
25662566
},
25672567
],
25682568
// Create a blinded tail where Carol is receiving. In our unblinded test cases, we'll
2569-
// override this anyway (with an unblinded receive, which LDK doesn't allow).
2569+
// override this anyway (with a tail sending to an unblinded receive, which LDK doesn't
2570+
// allow).
25702571
blinded_tail: Some(create_blinded_tail(
25712572
&secp_ctx,
25722573
override_random_bytes,
@@ -2604,7 +2605,7 @@ fn do_test_trampoline_relay(blinded: bool, test_case: TrampolineTestCase) {
26042605
};
26052606

26062607
// Replace the onion to test different scenarios:
2607-
// - If !blinded: Creates unblinded receive in trampoline onion
2608+
// - If !blinded: Creates a payload sending to an unblinded trampoline
26082609
// - If blinded: Modifies outer onion to create outer/inner mismatches if testing failures
26092610
update_message.map(|msg| {
26102611
msg.onion_routing_packet = replacement_onion(

0 commit comments

Comments
 (0)