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
Copy file name to clipboardExpand all lines: lightning/src/routing/router.rs
+17-5
Original file line number
Diff line number
Diff line change
@@ -670,6 +670,9 @@ where L::Target: Logger {
670
670
}
671
671
}
672
672
}
673
+
if payment_params.max_total_cltv_expiry_delta <= final_cltv_expiry_delta {
674
+
returnErr(LightningError{err:"Can't find a route where the maximum total CLTV expiry delta is below the final CLTV expiry.".to_owned(),action:ErrorAction::IgnoreError});
675
+
}
673
676
674
677
// The general routing idea is the following:
675
678
// 1. Fill first/last hops communicated by the caller.
@@ -866,9 +869,9 @@ where L::Target: Logger {
866
869
// In order to already account for some of the privacy enhancing random CLTV
867
870
// expiry delta offset we add on top later, we subtract a rough estimate
868
871
// (2*MEDIAN_HOP_CLTV_EXPIRY_DELTA) here.
869
-
let max_total_cltv_expiry_delta = payment_params.max_total_cltv_expiry_delta
872
+
let max_total_cltv_expiry_delta = (payment_params.max_total_cltv_expiry_delta - final_cltv_expiry_delta)
0 commit comments