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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ impl<T: Clone> StatusDeque<T> {
supermajority_stake: u64,
) -> Option<u64> {
// 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 mut total = 0;
for (tick_height, stake) in ticks_and_stakes.iter() {