Clean up type casts

This commit is contained in:
Michael Vines
2019-03-01 13:10:17 -08:00
parent a72325dbc2
commit fdc31e99df
7 changed files with 12 additions and 15 deletions

View File

@ -343,7 +343,7 @@ impl Bank {
tick_hash_queue.register_hash(hash);
tick_hash_queue.hash_height()
};
if current_tick_height % NUM_TICKS_PER_SECOND as u64 == 0 {
if current_tick_height % NUM_TICKS_PER_SECOND == 0 {
self.status_cache.write().unwrap().new_cache(hash);
}
}

View File

@ -71,7 +71,7 @@ impl HashQueue {
// this clean up can be deferred until sigs gets larger
// because we verify entry.nth every place we check for validity
if self.entries.len() >= MAX_RECENT_TICK_HASHES as usize {
if self.entries.len() >= MAX_RECENT_TICK_HASHES {
self.entries.retain(|_, entry| {
hash_height - entry.hash_height <= MAX_RECENT_TICK_HASHES as u64
});