counterparty_skimmed_fee_msat: Option<u64>, current_height: u32, accept_mpp_keysend: bool,
) -> Result<PendingHTLCInfo, InboundHTLCErr> {
let (
- payment_data, keysend_preimage, custom_tlvs, onion_amt_msat, outgoing_cltv_value,
+ payment_data, keysend_preimage, custom_tlvs, onion_amt_msat, onion_cltv_expiry,
payment_metadata, requires_blinded_error
) = match hop_data {
msgs::InboundOnionPayload::Receive {
}
};
// final_incorrect_cltv_expiry
- if outgoing_cltv_value > cltv_expiry {
+ if onion_cltv_expiry > cltv_expiry {
return Err(InboundHTLCErr {
msg: "Upstream node set CLTV to less than the CLTV set by the sender",
err_code: 18,
payment_data,
payment_preimage,
payment_metadata,
- incoming_cltv_expiry: outgoing_cltv_value,
+ incoming_cltv_expiry: onion_cltv_expiry,
custom_tlvs,
}
} else if let Some(data) = payment_data {
PendingHTLCRouting::Receive {
payment_data: data,
payment_metadata,
- incoming_cltv_expiry: outgoing_cltv_value,
+ incoming_cltv_expiry: onion_cltv_expiry,
phantom_shared_secret,
custom_tlvs,
requires_blinded_error,
incoming_shared_secret: shared_secret,
incoming_amt_msat: Some(amt_msat),
outgoing_amt_msat: onion_amt_msat,
- outgoing_cltv_value,
+ outgoing_cltv_value: onion_cltv_expiry,
skimmed_fee_msat: counterparty_skimmed_fee_msat,
})
}