- (short_channel_id, amt_to_forward, outgoing_cltv_value),
- msgs::InboundOnionPayload::BlindedForward { .. } => todo!(),
+ (short_channel_id, amt_to_forward, outgoing_cltv_value, None),
+ msgs::InboundOnionPayload::BlindedForward {
+ short_channel_id, payment_relay, payment_constraints, intro_node_blinding_point, features,
+ } => {
+ let (amt_to_forward, outgoing_cltv_value) = check_blinded_forward(
+ msg.amount_msat, msg.cltv_expiry, &payment_relay, &payment_constraints, &features
+ ).map_err(|()| {
+ // We should be returning malformed here if `msg.blinding_point` is set, but this is
+ // unreachable right now since we checked it in `decode_update_add_htlc_onion`.
+ InboundOnionErr {
+ msg: "Underflow calculating outbound amount or cltv value for blinded forward",
+ err_code: INVALID_ONION_BLINDING,
+ err_data: vec![0; 32],
+ }
+ })?;
+ (short_channel_id, amt_to_forward, outgoing_cltv_value, Some(intro_node_blinding_point))
+ },