From d017657bcd511ab01a7717d0a907b355dff9a198 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Tue, 9 May 2023 14:26:10 -0400 Subject: [PATCH] Fix panic on pathfinding to blinded recipient The previous dummy payee id was an invalid pubkey --- lightning/src/routing/router.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index f7ed173b9..30b1f8f1c 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -1295,7 +1295,7 @@ where L::Target: Logger { // unblinded payee id as an option. We also need a non-optional "payee id" for path construction, // so use a dummy id for this in the blinded case. let payee_node_id_opt = payment_params.payee.node_id().map(|pk| NodeId::from_pubkey(&pk)); - const DUMMY_BLINDED_PAYEE_ID: [u8; 33] = [42u8; 33]; + const DUMMY_BLINDED_PAYEE_ID: [u8; 33] = [2; 33]; let maybe_dummy_payee_pk = payment_params.payee.node_id().unwrap_or_else(|| PublicKey::from_slice(&DUMMY_BLINDED_PAYEE_ID).unwrap()); let maybe_dummy_payee_node_id = NodeId::from_pubkey(&maybe_dummy_payee_pk); let our_node_id = NodeId::from_pubkey(&our_node_pubkey); -- 2.39.5