From: Valentine Wallace Date: Tue, 9 May 2023 18:26:10 +0000 (-0400) Subject: Fix panic on pathfinding to blinded recipient X-Git-Tag: v0.0.116-alpha1~7^2~9 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d017657bcd511ab01a7717d0a907b355dff9a198;p=rust-lightning Fix panic on pathfinding to blinded recipient The previous dummy payee id was an invalid pubkey --- 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);