From 7f4d711f2116e040f8ea9d30ff684489ec0b9a82 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Wed, 6 Mar 2019 12:40:12 -0800 Subject: [PATCH] Fix sorting order of stakes in confirmation time calculations --- 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 8a72dadb269038..02754156b2cd55 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -343,7 +343,7 @@ impl Bank { supermajority_stake: u64, ) -> Option { // Sort by slot height - slots_and_stakes.sort_by(|a, b| a.0.cmp(&b.0)); + slots_and_stakes.sort_by(|a, b| b.0.cmp(&a.0)); let max_slot = self.slot(); let min_slot = max_slot.saturating_sub(MAX_RECENT_BLOCKHASHES as u64);