change DEFAULT_NUM_TICKS_PER_SECOND to DEFAULT_TICKS_PER_SECOND (#5559)

This commit is contained in:
Rob Walker
2019-08-19 23:22:56 -07:00
committed by GitHub
parent 2c2de12e88
commit 93ae98812b
8 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
use crate::message::Message;
use crate::timing::{DEFAULT_NUM_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT};
use crate::timing::{DEFAULT_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT};
use log::*;
#[derive(Serialize, Deserialize, PartialEq, Eq, Clone, Debug)]
@ -28,7 +28,7 @@ pub struct FeeCalculator {
/// TODO: determine good values for these
pub const DEFAULT_TARGET_LAMPORTS_PER_SIGNATURE: u64 = 42;
pub const DEFAULT_TARGET_SIGNATURES_PER_SLOT: usize =
710_000 * DEFAULT_TICKS_PER_SLOT as usize / DEFAULT_NUM_TICKS_PER_SECOND as usize;
710_000 * DEFAULT_TICKS_PER_SLOT as usize / DEFAULT_TICKS_PER_SECOND as usize;
pub const DEFAULT_BURN_PERCENT: u8 = 127;
impl Default for FeeCalculator {

View File

@ -1,4 +1,4 @@
use crate::timing::DEFAULT_NUM_TICKS_PER_SECOND;
use crate::timing::DEFAULT_TICKS_PER_SECOND;
use std::time::Duration;
#[derive(Serialize, Deserialize, Clone, Debug)]
@ -24,6 +24,6 @@ impl PohConfig {
impl Default for PohConfig {
fn default() -> Self {
Self::new_sleep(Duration::from_millis(1000 / DEFAULT_NUM_TICKS_PER_SECOND))
Self::new_sleep(Duration::from_millis(1000 / DEFAULT_TICKS_PER_SECOND))
}
}

View File

@ -4,7 +4,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
// The default tick rate that the cluster attempts to achieve. Note that the actual tick
// rate at any given time should be expected to drift
pub const DEFAULT_NUM_TICKS_PER_SECOND: u64 = 10;
pub const DEFAULT_TICKS_PER_SECOND: u64 = 10;
// At 10 ticks/s, 4 ticks per slot implies that leader rotation and voting will happen
// every 400 ms. A fast voting cadence ensures faster finality and convergence