You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return_err!("The CLTV expiry is too soon to handle",17,&[0;0]);
915
913
}
916
914
if next_hop_data.data.outgoing_cltv_value != msg.cltv_expiry{
@@ -1002,7 +1000,8 @@ impl ChannelManager {
1002
1000
breakSome(("Forwarding node has tampered with the intended HTLC values or origin node has an obsolete cltv_expiry_delta",0x1000 | 13,self.get_channel_update(chan).unwrap()));
1003
1001
}
1004
1002
let cur_height = self.latest_block_height.load(Ordering::Acquire)asu32 + 1;
1005
-
if msg.cltv_expiry <= cur_height + 3asu32{// expiry_too_soon
1003
+
// We want to have at least HTLC_FAIL_TIMEOUT_BLOCKS to fail prior to going on chain CLAIM_BUFFER blocks before expiration
1004
+
if msg.cltv_expiry <= cur_height + CLTV_CLAIM_BUFFER + HTLC_FAIL_TIMEOUT_BLOCKSasu32{// expiry_too_soon
1006
1005
breakSome(("CLTV expiry is too close",0x1000 | 14,self.get_channel_update(chan).unwrap()));
1007
1006
}
1008
1007
if msg.cltv_expiry > cur_height + CLTV_FAR_FAR_AWAYasu32{// expiry_too_far
0 commit comments