From 0232944c95f41d3e5da876cdcc59f92e9193dde3 Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Fri, 28 Oct 2022 12:22:58 -0400 Subject: [PATCH] Uses Storages to update accounts hash in bank_to_snapshot_archive() (#28618) --- runtime/src/snapshot_utils.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index ef4b931d7f..3fd27e6b8c 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -1,7 +1,8 @@ use { crate::{ accounts_db::{ - AccountShrinkThreshold, AccountsDbConfig, SnapshotStorage, SnapshotStorages, + AccountShrinkThreshold, AccountsDbConfig, CalcAccountsHashDataSource, SnapshotStorage, + SnapshotStorages, }, accounts_index::AccountSecondaryIndexes, accounts_update_notifier_interface::AccountsUpdateNotifier, @@ -2171,7 +2172,7 @@ pub fn bank_to_full_snapshot_archive( bank.squash(); // Bank may not be a root bank.force_flush_accounts_cache(); bank.clean_accounts(Some(bank.slot())); - bank.update_accounts_hash(); + bank.update_accounts_hash_with_index_option(CalcAccountsHashDataSource::Storages, false, false); bank.rehash(); // Bank accounts may have been manually modified by the caller let temp_dir = tempfile::tempdir_in(bank_snapshots_dir)?; @@ -2218,7 +2219,7 @@ pub fn bank_to_incremental_snapshot_archive( bank.squash(); // Bank may not be a root bank.force_flush_accounts_cache(); bank.clean_accounts(Some(full_snapshot_slot)); - bank.update_accounts_hash(); + bank.update_accounts_hash_with_index_option(CalcAccountsHashDataSource::Storages, false, false); bank.rehash(); // Bank accounts may have been manually modified by the caller let temp_dir = tempfile::tempdir_in(bank_snapshots_dir)?;