Skip to content

Commit 17d92fb

Browse files
f const-ify overpay estimate multiplier
1 parent 7a97bfb commit 17d92fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,9 @@ pub(crate) fn set_max_path_length(
328328
.serialized_length()
329329
.saturating_add(PAYLOAD_HMAC_LEN);
330330

331+
const OVERPAY_ESTIMATE_MULTIPLER: u64 = 3;
331332
let final_value_msat_with_overpay_buffer = core::cmp::max(
332-
route_params.final_value_msat.saturating_mul(4),
333+
route_params.final_value_msat.saturating_mul(OVERPAY_ESTIMATE_MULTIPLER),
333334
MIN_FINAL_VALUE_ESTIMATE_WITH_OVERPAY,
334335
);
335336

0 commit comments

Comments
 (0)