cleanup api (#22845)
This commit is contained in:
parent
bc800a8d5a
commit
fb95fa68a2
|
@ -1248,7 +1248,6 @@ fn load_frozen_forks(
|
|||
new_root_bank.update_accounts_hash_with_index_option(
|
||||
snapshot_config.accounts_hash_use_index,
|
||||
snapshot_config.accounts_hash_debug_verify,
|
||||
Some(new_root_bank.epoch_schedule().slots_per_epoch),
|
||||
false,
|
||||
);
|
||||
snapshot_utils::snapshot_bank(
|
||||
|
|
|
@ -111,7 +111,7 @@ impl SnapshotRequestHandler {
|
|||
let previous_hash = if test_hash_calculation {
|
||||
// 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.
|
||||
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 {
|
||||
Hash::default()
|
||||
};
|
||||
|
@ -149,7 +149,6 @@ impl SnapshotRequestHandler {
|
|||
let this_hash = snapshot_root_bank.update_accounts_hash_with_index_option(
|
||||
use_index_hash_calculation,
|
||||
test_hash_calculation,
|
||||
Some(snapshot_root_bank.epoch_schedule().slots_per_epoch),
|
||||
false,
|
||||
);
|
||||
let hash_for_testing = if test_hash_calculation {
|
||||
|
|
|
@ -5755,9 +5755,9 @@ impl Bank {
|
|||
&self,
|
||||
use_index: bool,
|
||||
mut debug_verify: bool,
|
||||
slots_per_epoch: Option<Slot>,
|
||||
is_startup: bool,
|
||||
) -> Hash {
|
||||
let slots_per_epoch = Some(self.epoch_schedule().slots_per_epoch);
|
||||
let (hash, total_lamports) = self
|
||||
.rc
|
||||
.accounts
|
||||
|
@ -5810,7 +5810,7 @@ impl Bank {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue