From b63a65bc2170daea16c15d5415f57d529e0a27e5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 00:51:27 +0000 Subject: [PATCH] validator: run poh speed test earlier in start up (#18023) (cherry picked from commit 5bc6c89adc2c2cced25b79e361b9a9e2a351297a) Co-authored-by: Trent Nelson --- core/src/validator.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 6a769022e3..5b3c58d9cb 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -405,6 +405,7 @@ impl Validator { &exit, config.enforce_ulimit_nofile, &start_progress, + config.no_poh_speed_test, ); *start_progress.write().unwrap() = ValidatorStartProgress::StartingServices; @@ -635,10 +636,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, @@ -1032,6 +1029,7 @@ fn new_banks_from_ledger( exit: &Arc, enforce_ulimit_nofile: bool, start_progress: &Arc>, + no_poh_speed_test: bool, ) -> ( GenesisConfig, BankForks, @@ -1065,6 +1063,10 @@ fn new_banks_from_ledger( } } + if !no_poh_speed_test { + check_poh_speed(&genesis_config, None); + } + let BlockstoreSignals { mut blockstore, ledger_signal_receiver,