Refactors a sort's comparator fn (#30243)

This commit is contained in:
Brooks 2023-02-10 15:41:55 -05:00 committed by GitHub
parent 5ad8c8bd20
commit b3c2256799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();