From b3c22567995c3bb24b881b14827a3cf90e6c6741 Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 10 Feb 2023 15:41:55 -0500 Subject: [PATCH] Refactors a sort's comparator fn (#30243) --- runtime/src/bank.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 61654fa2c7..f4991c962c 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -5011,7 +5011,7 @@ impl Bank { // If two items are still equal, their relative order does not matter since // both refer to the same validator. validator_stakes.sort_unstable_by(|(pubkey1, staked1), (pubkey2, staked2)| { - staked2.cmp(staked1).then(pubkey2.cmp(pubkey1)) + (staked1, pubkey1).cmp(&(staked2, pubkey2)).reverse() }); let enforce_fix = self.no_overflow_rent_distribution_enabled();