cleanup api (#22845)

This commit is contained in:
Jeff Washington (jwash) 2022-01-31 11:39:23 -06:00 committed by GitHub
parent bc800a8d5a
commit fb95fa68a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -1248,7 +1248,6 @@ fn load_frozen_forks(
new_root_bank.update_accounts_hash_with_index_option( new_root_bank.update_accounts_hash_with_index_option(
snapshot_config.accounts_hash_use_index, snapshot_config.accounts_hash_use_index,
snapshot_config.accounts_hash_debug_verify, snapshot_config.accounts_hash_debug_verify,
Some(new_root_bank.epoch_schedule().slots_per_epoch),
false, false,
); );
snapshot_utils::snapshot_bank( snapshot_utils::snapshot_bank(

View File

@ -111,7 +111,7 @@ impl SnapshotRequestHandler {
let previous_hash = if test_hash_calculation { let previous_hash = if test_hash_calculation {
// We have to use the index version here. // We have to use the index version here.
// We cannot calculate the non-index way because cache has not been flushed and stores don't match reality. // We cannot calculate the non-index way because cache has not been flushed and stores don't match reality.
snapshot_root_bank.update_accounts_hash_with_index_option(true, false, None, false) snapshot_root_bank.update_accounts_hash_with_index_option(true, false, false)
} else { } else {
Hash::default() Hash::default()
}; };
@ -149,7 +149,6 @@ impl SnapshotRequestHandler {
let this_hash = snapshot_root_bank.update_accounts_hash_with_index_option( let this_hash = snapshot_root_bank.update_accounts_hash_with_index_option(
use_index_hash_calculation, use_index_hash_calculation,
test_hash_calculation, test_hash_calculation,
Some(snapshot_root_bank.epoch_schedule().slots_per_epoch),
false, false,
); );
let hash_for_testing = if test_hash_calculation { let hash_for_testing = if test_hash_calculation {

View File

@ -5755,9 +5755,9 @@ impl Bank {
&self, &self,
use_index: bool, use_index: bool,
mut debug_verify: bool, mut debug_verify: bool,
slots_per_epoch: Option<Slot>,
is_startup: bool, is_startup: bool,
) -> Hash { ) -> Hash {
let slots_per_epoch = Some(self.epoch_schedule().slots_per_epoch);
let (hash, total_lamports) = self let (hash, total_lamports) = self
.rc .rc
.accounts .accounts
@ -5810,7 +5810,7 @@ impl Bank {
} }
pub fn update_accounts_hash(&self) -> Hash { pub fn update_accounts_hash(&self) -> Hash {
self.update_accounts_hash_with_index_option(true, false, None, false) self.update_accounts_hash_with_index_option(true, false, false)
} }
/// A snapshot bank should be purged of 0 lamport accounts which are not part of the hash /// A snapshot bank should be purged of 0 lamport accounts which are not part of the hash