Use newer votes to calculate confirmation time (#2247)

This commit is contained in:
Pankaj Garg
2018-12-20 15:27:47 -08:00
committed by GitHub
parent bb1060bdad
commit 7c98545b33

View File

@ -190,7 +190,7 @@ impl<T: Clone> StatusDeque<T> {
supermajority_stake: u64, supermajority_stake: u64,
) -> Option<u64> { ) -> Option<u64> {
// Sort by tick height // Sort by tick height
ticks_and_stakes.sort_by(|a, b| a.0.cmp(&b.0)); ticks_and_stakes.sort_by(|a, b| b.0.cmp(&a.0));
let current_tick_height = self.tick_height; let current_tick_height = self.tick_height;
let mut total = 0; let mut total = 0;
for (tick_height, stake) in ticks_and_stakes.iter() { for (tick_height, stake) in ticks_and_stakes.iter() {