@@ -122,7 +122,7 @@ pub(super) fn create_recv_pending_htlc_info(
122
122
counterparty_skimmed_fee_msat : Option < u64 > , current_height : u32 , accept_mpp_keysend : bool ,
123
123
) -> Result < PendingHTLCInfo , InboundHTLCErr > {
124
124
let (
125
- payment_data, keysend_preimage, custom_tlvs, onion_amt_msat, outgoing_cltv_value ,
125
+ payment_data, keysend_preimage, custom_tlvs, onion_amt_msat, onion_cltv_expiry ,
126
126
payment_metadata, requires_blinded_error
127
127
) = match hop_data {
128
128
msgs:: InboundOnionPayload :: Receive {
@@ -162,7 +162,7 @@ pub(super) fn create_recv_pending_htlc_info(
162
162
}
163
163
} ;
164
164
// final_incorrect_cltv_expiry
165
- if outgoing_cltv_value > cltv_expiry {
165
+ if onion_cltv_expiry > cltv_expiry {
166
166
return Err ( InboundHTLCErr {
167
167
msg : "Upstream node set CLTV to less than the CLTV set by the sender" ,
168
168
err_code : 18 ,
@@ -221,14 +221,14 @@ pub(super) fn create_recv_pending_htlc_info(
221
221
payment_data,
222
222
payment_preimage,
223
223
payment_metadata,
224
- incoming_cltv_expiry : outgoing_cltv_value ,
224
+ incoming_cltv_expiry : onion_cltv_expiry ,
225
225
custom_tlvs,
226
226
}
227
227
} else if let Some ( data) = payment_data {
228
228
PendingHTLCRouting :: Receive {
229
229
payment_data : data,
230
230
payment_metadata,
231
- incoming_cltv_expiry : outgoing_cltv_value ,
231
+ incoming_cltv_expiry : onion_cltv_expiry ,
232
232
phantom_shared_secret,
233
233
custom_tlvs,
234
234
requires_blinded_error,
@@ -246,7 +246,7 @@ pub(super) fn create_recv_pending_htlc_info(
246
246
incoming_shared_secret : shared_secret,
247
247
incoming_amt_msat : Some ( amt_msat) ,
248
248
outgoing_amt_msat : onion_amt_msat,
249
- outgoing_cltv_value,
249
+ outgoing_cltv_value : onion_cltv_expiry ,
250
250
skimmed_fee_msat : counterparty_skimmed_fee_msat,
251
251
} )
252
252
}
0 commit comments