fix ci test error (#23908)

This commit is contained in:
Jeff Washington (jwash) 2022-03-24 11:30:20 -05:00 committed by GitHub
parent 82945ba973
commit a22a2384bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -5492,14 +5492,8 @@ impl AccountsDb {
is_startup: bool, is_startup: bool,
) -> Result<(Hash, u64), BankHashVerificationError> { ) -> Result<(Hash, u64), BankHashVerificationError> {
if !use_index { if !use_index {
let ancestors = if can_cached_slot_be_unflushed {
Some(ancestors)
} else {
None
};
let mut collect_time = Measure::start("collect"); let mut collect_time = Measure::start("collect");
let (combined_maps, slots) = self.get_snapshot_storages(slot, None, ancestors); let (combined_maps, slots) = self.get_snapshot_storages(slot, None, Some(ancestors));
collect_time.stop(); collect_time.stop();
let mut sort_time = Measure::start("sort_storages"); let mut sort_time = Measure::start("sort_storages");
@ -5525,7 +5519,7 @@ impl AccountsDb {
use_bg_thread_pool: !is_startup, use_bg_thread_pool: !is_startup,
stats: timings, stats: timings,
check_hash, check_hash,
ancestors, ancestors: can_cached_slot_be_unflushed.then(|| ancestors),
}) })
} else { } else {
self.calculate_accounts_hash(slot, ancestors, check_hash) self.calculate_accounts_hash(slot, ancestors, check_hash)