Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
validator: run poh speed test earlier in start up
Browse files Browse the repository at this point in the history
(cherry picked from commit 5bc6c89)
  • Loading branch information
t-nelson authored and mergify-bot committed Jun 16, 2021
1 parent 4ed0fcd commit 7dea8a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ impl Validator {
&exit,
config.enforce_ulimit_nofile,
&start_progress,
config.no_poh_speed_test,
);

*start_progress.write().unwrap() = ValidatorStartProgress::StartingServices;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7dea8a7

Please sign in to comment.