Purge MAX_RECENT_TICK_HASHES

This commit is contained in:
Michael Vines
2019-03-02 16:35:13 -08:00
committed by Grimes
parent 398b78dd97
commit a9a7fc56eb
6 changed files with 13 additions and 15 deletions

View File

@ -17,9 +17,8 @@ pub const DEFAULT_SLOTS_PER_EPOCH: u64 = 64;
/// not be processed by the network.
pub const MAX_HASH_AGE_IN_SECONDS: usize = 120;
pub const MAX_RECENT_TICK_HASHES: usize = NUM_TICKS_PER_SECOND as usize * MAX_HASH_AGE_IN_SECONDS;
pub const MAX_RECENT_BLOCKHASHES: usize =
MAX_RECENT_TICK_HASHES / (DEFAULT_TICKS_PER_SLOT as usize);
(NUM_TICKS_PER_SECOND * MAX_HASH_AGE_IN_SECONDS as u64 / DEFAULT_TICKS_PER_SLOT) as usize;
pub fn duration_as_us(d: &Duration) -> u64 {
(d.as_secs() * 1000 * 1000) + (u64::from(d.subsec_nanos()) / 1_000)