validator: run poh speed test earlier in start up

This commit is contained in:
Trent Nelson 2021-06-16 10:52:27 -06:00 committed by mergify[bot]
parent 43775111fb
commit 5bc6c89adc
1 changed files with 6 additions and 4 deletions

View File

@ -385,6 +385,7 @@ impl Validator {
&exit, &exit,
config.enforce_ulimit_nofile, config.enforce_ulimit_nofile,
&start_progress, &start_progress,
config.no_poh_speed_test,
); );
*start_progress.write().unwrap() = ValidatorStartProgress::StartingServices; *start_progress.write().unwrap() = ValidatorStartProgress::StartingServices;
@ -616,10 +617,6 @@ impl Validator {
(None, None) (None, None)
}; };
if !config.no_poh_speed_test {
check_poh_speed(&genesis_config, None);
}
let waited_for_supermajority = if let Ok(waited) = wait_for_supermajority( let waited_for_supermajority = if let Ok(waited) = wait_for_supermajority(
config, config,
&bank, &bank,
@ -1021,6 +1018,7 @@ fn new_banks_from_ledger(
exit: &Arc<AtomicBool>, exit: &Arc<AtomicBool>,
enforce_ulimit_nofile: bool, enforce_ulimit_nofile: bool,
start_progress: &Arc<RwLock<ValidatorStartProgress>>, start_progress: &Arc<RwLock<ValidatorStartProgress>>,
no_poh_speed_test: bool,
) -> ( ) -> (
GenesisConfig, GenesisConfig,
BankForks, BankForks,
@ -1054,6 +1052,10 @@ fn new_banks_from_ledger(
} }
} }
if !no_poh_speed_test {
check_poh_speed(&genesis_config, None);
}
let BlockstoreSignals { let BlockstoreSignals {
mut blockstore, mut blockstore,
ledger_signal_receiver, ledger_signal_receiver,