Skip to content

Commit 50f826f

Browse files
committed
TODO: rephrase: blinded hop error handling
1 parent 0ee1def commit 50f826f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2232,6 +2232,12 @@ where
22322232
Ok(Hop::BlindedReceive { shared_secret, hop_data })
22332233
},
22342234
msgs::InboundOnionPayload::TrampolineEntrypoint(hop_data) => {
2235+
if blinding_point.is_some() {
2236+
return Err(OnionDecodeErr::Malformed {
2237+
err_msg: "UpdateAddHTLC messages cannot contain blinding points for TrampolineEntryPoint payloads.",
2238+
reason: LocalHTLCFailureReason::InvalidOnionBlinding,
2239+
});
2240+
}
22352241
let incoming_trampoline_public_key = hop_data.trampoline_packet.public_key;
22362242
let trampoline_blinded_node_id_tweak = hop_data.current_path_key.map(|bp| {
22372243
let blinded_tlvs_ss =
@@ -2256,7 +2262,7 @@ where
22562262
&hop_data.trampoline_packet.hop_data,
22572263
hop_data.trampoline_packet.hmac,
22582264
Some(payment_hash),
2259-
(blinding_point, node_signer),
2265+
(hop_data.current_path_key, node_signer),
22602266
);
22612267
match decoded_trampoline_hop {
22622268
Ok((

0 commit comments

Comments
 (0)