hash calc uses all threads during startup (#20735)

This commit is contained in:
Jeff Washington (jwash)
2021-10-15 17:41:23 -05:00
committed by GitHub
parent 4cac66244d
commit 70b2e5fef2
6 changed files with 40 additions and 9 deletions

View File

@@ -687,6 +687,7 @@ impl Accounts {
debug_verify: bool,
) -> u64 {
let use_index = false;
let is_startup = false; // there may be conditions where this is called at startup.
self.accounts_db
.update_accounts_hash_with_index_option(
use_index,
@@ -696,10 +697,12 @@ impl Accounts {
None,
can_cached_slot_be_unflushed,
None,
is_startup,
)
.1
}
/// Only called from startup or test code.
#[must_use]
pub fn verify_bank_hash_and_lamports(
&self,