Skip to content

Commit 42757e7

Browse files
f update comment and dummy node id
1 parent b3988c3 commit 42757e7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lightning/src/routing/router.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,11 +1280,13 @@ pub(crate) fn get_route<L: Deref, S: Score>(
12801280
_random_seed_bytes: &[u8; 32]
12811281
) -> Result<Route, LightningError>
12821282
where L::Target: Logger {
1283-
// If we're routing to a blinded recipient, we won't have their node id. Therefore, keep the
1283+
// If we're routing to a blinded recipient, we might not have their node id. Therefore, keep the
12841284
// unblinded payee id as an option. We also need a non-optional "payee id" for path construction,
1285-
// so use a dummy id for this in the blinded case.
1285+
// so use a dummy id for this if we don't know the recipient's node id. If there are any 1-hop
1286+
// blinded paths, we'll later set the payee node id and the maybe-dummy node id to the path's
1287+
// introduction node id.
12861288
let mut payee_node_id_opt = payment_params.payee.node_id().map(|pk| NodeId::from_pubkey(&pk));
1287-
const DUMMY_BLINDED_PAYEE_ID: [u8; 33] = [3, 91, 229, 233, 71, 130, 9, 103, 74, 150, 230, 15, 31, 3, 127, 97, 118, 84, 15, 208, 1, 250, 29, 100, 105, 71, 112, 197, 106, 119, 9, 196, 44]; // pubkey corresponding to secret [42; 33]
1289+
const DUMMY_BLINDED_PAYEE_ID: [u8; 33] = [2; 33];
12881290
let mut maybe_dummy_payee_pk = payment_params.payee.node_id().unwrap_or_else(|| PublicKey::from_slice(&DUMMY_BLINDED_PAYEE_ID).unwrap());
12891291
let mut maybe_dummy_payee_node_id = NodeId::from_pubkey(&maybe_dummy_payee_pk);
12901292
let our_node_id = NodeId::from_pubkey(&our_node_pubkey);

0 commit comments

Comments
 (0)