validator: run poh speed test earlier in start up (#18024)

(cherry picked from commit 5bc6c89adc)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2021-06-16 23:28:15 +00:00
committed by GitHub
parent 30bbc1350d
commit 4df9da5c48

View File

@ -381,6 +381,7 @@ impl Validator {
&exit,
config.enforce_ulimit_nofile,
&start_progress,
config.no_poh_speed_test,
);
*start_progress.write().unwrap() = ValidatorStartProgress::StartingServices;
@ -612,10 +613,6 @@ impl Validator {
(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(
config,
&bank,
@ -1009,6 +1006,7 @@ fn new_banks_from_ledger(
exit: &Arc<AtomicBool>,
enforce_ulimit_nofile: bool,
start_progress: &Arc<RwLock<ValidatorStartProgress>>,
no_poh_speed_test: bool,
) -> (
GenesisConfig,
BankForks,
@ -1042,6 +1040,10 @@ fn new_banks_from_ledger(
}
}
if !no_poh_speed_test {
check_poh_speed(&genesis_config, None);
}
let BlockstoreSignals {
mut blockstore,
ledger_signal_receiver,