We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7474271 commit 28cebe1Copy full SHA for 28cebe1
lightning/src/routing/router.rs
@@ -1576,7 +1576,8 @@ where L::Target: Logger {
1576
let max_path_offset = payment_params.max_total_cltv_expiry_delta
1577
.checked_sub(path.iter().fold(0, |acc,b| b.as_ref().unwrap().cltv_expiry_delta.max(acc)))
1578
.unwrap_or(shadow_ctlv_expiry_delta_offset);
1579
- shadow_ctlv_expiry_delta_offset = cmp::min(shadow_ctlv_expiry_delta_offset, max_path_offset);
+ shadow_ctlv_expiry_delta_offset = cmp::min(shadow_ctlv_expiry_delta_offset,
1580
+ max_path_offset.checked_sub(max_path_offset.wrapping_rem(40)).unwrap_or(max_path_offset));
1581
1582
// Add 'shadow' CLTV offset to all hops but the final one
1583
for h in path {
0 commit comments