Skip to content

Commit

Permalink
validator: run poh speed test earlier in start up (#18023)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5bc6c89)

Co-authored-by: Trent Nelson <[email protected]>
  • Loading branch information
mergify[bot] and t-nelson authored Jun 17, 2021
1 parent 392d2db commit b63a65b
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 @@ -405,6 +405,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 @@ -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,
Expand Down Expand Up @@ -1032,6 +1029,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 @@ -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,
Expand Down

0 comments on commit b63a65b

Please sign in to comment.