Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 77ec5fa

Browse files
Merge pull request #810 from MutinyWallet/rm-extra-max
Remove extra calls of .max in scorer
2 parents 00be6e8 + fa443d7 commit 77ec5fa

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

mutiny-core/src/scorer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ impl ScoreLookUp for HubPreferentialScorer {
320320
penalty = penalty
321321
.saturating_sub(HUB_BASE_DISCOUNT_PENALTY_MSAT)
322322
.max(hub_to_hub_min_penalty); // Base fee discount
323-
penalty = penalty.max(hub_to_hub_min_penalty);
324323
} else if self.is_preferred_hub(target) {
325324
// Only the target is a preferred hub (entering the "hub highway")
326325
penalty = penalty.saturating_mul(7).saturating_div(10); // 30% discount
@@ -335,7 +334,6 @@ impl ScoreLookUp for HubPreferentialScorer {
335334
penalty = penalty
336335
.saturating_add(HUB_BASE_DISCOUNT_PENALTY_MSAT)
337336
.max(score_params.base_penalty_msat); // Base fee penalty
338-
penalty = penalty.max(score_params.base_penalty_msat);
339337
}
340338

341339
penalty

0 commit comments

Comments
 (0)