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