We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60801d9 commit 8b5cd47Copy full SHA for 8b5cd47
lightning/src/ln/onion_utils.rs
@@ -333,13 +333,10 @@ pub(crate) fn set_max_path_length(
333
.saturating_add(PAYLOAD_HMAC_LEN);
334
335
const OVERPAY_ESTIMATE_MULTIPLER: u64 = 3;
336
- let final_value_msat_with_overpay_buffer = core::cmp::min(
337
- 0x1000_0000,
338
- core::cmp::max(
339
- route_params.final_value_msat.saturating_mul(OVERPAY_ESTIMATE_MULTIPLER),
340
- MIN_FINAL_VALUE_ESTIMATE_WITH_OVERPAY,
341
- ),
342
- );
+ let final_value_msat_with_overpay_buffer = route_params
+ .final_value_msat
+ .saturating_mul(OVERPAY_ESTIMATE_MULTIPLER)
+ .clamp(MIN_FINAL_VALUE_ESTIMATE_WITH_OVERPAY, 0x1000_0000);
343
344
let blinded_tail_opt = route_params
345
.payment_params
0 commit comments