use precalculated max_tick_height (#5084)

This commit is contained in:
Rob Walker 2019-07-12 22:25:48 -07:00 committed by GitHub
parent 6accf21229
commit 16b6576839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1381,8 +1381,7 @@ impl Bank {
} }
pub fn is_votable(&self) -> bool { pub fn is_votable(&self) -> bool {
let max_tick_height = (self.slot + 1) * self.ticks_per_slot - 1; self.is_delta.load(Ordering::Relaxed) && self.tick_height() == self.max_tick_height
self.is_delta.load(Ordering::Relaxed) && self.tick_height() == max_tick_height
} }
/// Add an instruction processor to intercept instructions before the dynamic loader. /// Add an instruction processor to intercept instructions before the dynamic loader.