Skip to content

Commit

Permalink
Merge pull request #810 from MutinyWallet/rm-extra-max
Browse files Browse the repository at this point in the history
Remove extra calls of .max in scorer
  • Loading branch information
TonyGiorgio authored Oct 26, 2023
2 parents 00be6e8 + fa443d7 commit 77ec5fa
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mutiny-core/src/scorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ impl ScoreLookUp for HubPreferentialScorer {
penalty = penalty
.saturating_sub(HUB_BASE_DISCOUNT_PENALTY_MSAT)
.max(hub_to_hub_min_penalty); // Base fee discount
penalty = penalty.max(hub_to_hub_min_penalty);
} else if self.is_preferred_hub(target) {
// Only the target is a preferred hub (entering the "hub highway")
penalty = penalty.saturating_mul(7).saturating_div(10); // 30% discount
Expand All @@ -335,7 +334,6 @@ impl ScoreLookUp for HubPreferentialScorer {
penalty = penalty
.saturating_add(HUB_BASE_DISCOUNT_PENALTY_MSAT)
.max(score_params.base_penalty_msat); // Base fee penalty
penalty = penalty.max(score_params.base_penalty_msat);
}

penalty
Expand Down

0 comments on commit 77ec5fa

Please sign in to comment.