Skip to content

Commit d6dfa17

Browse files
committed
f duh one less computation
1 parent 9ddf4dd commit d6dfa17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,8 +1531,8 @@ where L::Target: Logger {
15311531
// recompute the fees again, so that if that's the case, we match the currently
15321532
// underpaid htlc_minimum_msat with fees.
15331533
debug_assert_eq!(payment_path.get_value_msat(), value_contribution_msat);
1534-
payment_path.update_value_and_recompute_fees(cmp::min(value_contribution_msat, final_value_msat));
15351534
value_contribution_msat = cmp::min(value_contribution_msat, final_value_msat);
1535+
payment_path.update_value_and_recompute_fees(value_contribution_msat);
15361536

15371537
// Since a path allows to transfer as much value as
15381538
// the smallest channel it has ("bottleneck"), we should recompute

0 commit comments

Comments
 (0)