Skip to content

Commit

Permalink
f Drop the cmp::min and just deduct from prev final_value_msat
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Sep 28, 2023
1 parent 98c9849 commit dbad082
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lightning/src/ln/outbound_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,7 @@ impl OutboundPayments {

// We calculate the remaining target amount by subtracting the succeded
// path values.
let final_value_msat = core::cmp::min(route_params.final_value_msat, route.get_total_amount());
route_params.final_value_msat = final_value_msat
route_params.final_value_msat = route_params.final_value_msat
.saturating_sub(total_ok_amt_sent_msat);
Some(route_params)
} else { None }
Expand Down

0 comments on commit dbad082

Please sign in to comment.