@@ -3178,15 +3178,17 @@ where
3178
3178
return_err!(err_msg, err_code, &[0; 0]);
3179
3179
},
3180
3180
};
3181
- let (outgoing_scid, outgoing_amt_msat, outgoing_cltv_value, next_packet_pk_opt) = match next_hop {
3181
+ let (
3182
+ outgoing_scid, outgoing_amt_msat, outgoing_cltv_value, next_packet_pk_opt, is_blinded
3183
+ ) = match next_hop {
3182
3184
onion_utils::Hop::Forward {
3183
3185
next_hop_data: msgs::InboundOnionPayload::Forward {
3184
3186
short_channel_id, amt_to_forward, outgoing_cltv_value
3185
3187
}, ..
3186
3188
} => {
3187
3189
let next_packet_pk = onion_utils::next_hop_pubkey(&self.secp_ctx,
3188
3190
msg.onion_routing_packet.public_key.unwrap(), &shared_secret);
3189
- (short_channel_id, amt_to_forward, outgoing_cltv_value, Some(next_packet_pk))
3191
+ (short_channel_id, amt_to_forward, outgoing_cltv_value, Some(next_packet_pk), false )
3190
3192
},
3191
3193
onion_utils::Hop::Forward {
3192
3194
next_hop_data: msgs::InboundOnionPayload::BlindedForward {
@@ -3204,7 +3206,7 @@ where
3204
3206
};
3205
3207
let next_packet_pk = onion_utils::next_hop_pubkey(&self.secp_ctx,
3206
3208
msg.onion_routing_packet.public_key.unwrap(), &shared_secret);
3207
- (short_channel_id, amt_to_forward, outgoing_cltv_value, Some(next_packet_pk))
3209
+ (short_channel_id, amt_to_forward, outgoing_cltv_value, Some(next_packet_pk), true )
3208
3210
},
3209
3211
// We'll do receive checks in [`Self::construct_pending_htlc_info`] so we have access to the
3210
3212
// inbound channel's state.
@@ -3327,6 +3329,7 @@ where
3327
3329
break None;
3328
3330
}
3329
3331
{
3332
+ if is_blinded { return_err!(err, INVALID_ONION_BLINDING, vec![0; 32]); }
3330
3333
let mut res = VecWriter(Vec::with_capacity(chan_update.serialized_length() + 2 + 8 + 2));
3331
3334
if let Some(chan_update) = chan_update {
3332
3335
if code == 0x1000 | 11 || code == 0x1000 | 12 {
0 commit comments