diff --git a/core/src/validator.rs b/core/src/validator.rs index 4c138b854..7932bfe8d 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -1927,7 +1927,8 @@ fn wait_for_supermajority( } for i in 1.. { - if i % 10 == 1 { + let logging = i % 10 == 1; + if logging { info!( "Waiting for {}% of activated stake at slot {} to be in gossip...", WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT, @@ -1936,7 +1937,7 @@ fn wait_for_supermajority( } let gossip_stake_percent = - get_stake_percent_in_gossip(&bank, cluster_info, i % 10 == 0); + get_stake_percent_in_gossip(&bank, cluster_info, logging); *start_progress.write().unwrap() = ValidatorStartProgress::WaitingForSupermajority { diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index f37f3b7d9..f235caa28 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -1651,7 +1651,7 @@ fn test_optimistic_confirmation_violation_detection() { // from resetting to the parent of `prev_voted_slot` to create an alternative fork because // 1) Validator can't vote on earlier ancestor of last vote due to switch threshold (can't vote // on ancestors of last vote) - // 2) Won't reset to this earlier ancestor becasue reset can only happen on same voted fork if + // 2) Won't reset to this earlier ancestor because reset can only happen on same voted fork if // it's for the last vote slot or later remove_tower(&exited_validator_info.info.ledger_path, &node_to_restart); blockstore.set_dead_slot(prev_voted_slot).unwrap(); diff --git a/validator/src/cli.rs b/validator/src/cli.rs index 9b5949202..b8f363d4a 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -590,7 +590,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .takes_value(true) .possible_values(&["none", "lz4", "snappy", "zlib"]) .default_value(&default_args.rocksdb_ledger_compression) - .help("The compression alrogithm that is used to compress \ + .help("The compression algorithm that is used to compress \ transaction status data. \ Turning on compression can save ~10% of the ledger size."), )