Renames fn to update_accounts_hash() (#28574)
This commit is contained in:
parent
51e1a7f2af
commit
1dbcb78de7
|
@ -125,7 +125,7 @@ fn main() {
|
|||
.update_accounts_hash_for_tests(0, &ancestors, false, false);
|
||||
time.stop();
|
||||
let mut time_store = Measure::start("hash using store");
|
||||
let results_store = accounts.accounts_db.update_accounts_hash_with_index_option(
|
||||
let results_store = accounts.accounts_db.update_accounts_hash(
|
||||
false,
|
||||
false,
|
||||
solana_sdk::clock::Slot::default(),
|
||||
|
|
|
@ -795,7 +795,7 @@ impl Accounts {
|
|||
.verify_accounts_hash_in_bg
|
||||
.wait_for_complete();
|
||||
self.accounts_db
|
||||
.update_accounts_hash_with_index_option(
|
||||
.update_accounts_hash(
|
||||
use_index,
|
||||
debug_verify,
|
||||
slot,
|
||||
|
|
|
@ -6916,7 +6916,7 @@ impl AccountsDb {
|
|||
debug_verify: bool,
|
||||
is_startup: bool,
|
||||
) -> (Hash, u64) {
|
||||
self.update_accounts_hash_with_index_option(
|
||||
self.update_accounts_hash(
|
||||
true,
|
||||
debug_verify,
|
||||
slot,
|
||||
|
@ -7281,7 +7281,7 @@ impl AccountsDb {
|
|||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn update_accounts_hash_with_index_option(
|
||||
pub fn update_accounts_hash(
|
||||
&self,
|
||||
use_index: bool,
|
||||
debug_verify: bool,
|
||||
|
|
|
@ -6970,20 +6970,16 @@ impl Bank {
|
|||
mut debug_verify: bool,
|
||||
is_startup: bool,
|
||||
) -> Hash {
|
||||
let (hash, total_lamports) = self
|
||||
.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.update_accounts_hash_with_index_option(
|
||||
use_index,
|
||||
debug_verify,
|
||||
self.slot(),
|
||||
&self.ancestors,
|
||||
Some(self.capitalization()),
|
||||
self.epoch_schedule(),
|
||||
&self.rent_collector,
|
||||
is_startup,
|
||||
);
|
||||
let (hash, total_lamports) = self.rc.accounts.accounts_db.update_accounts_hash(
|
||||
use_index,
|
||||
debug_verify,
|
||||
self.slot(),
|
||||
&self.ancestors,
|
||||
Some(self.capitalization()),
|
||||
self.epoch_schedule(),
|
||||
&self.rent_collector,
|
||||
is_startup,
|
||||
);
|
||||
if total_lamports != self.capitalization() {
|
||||
datapoint_info!(
|
||||
"capitalization_mismatch",
|
||||
|
@ -6996,19 +6992,16 @@ impl Bank {
|
|||
// cap mismatch detected. It has been logged to metrics above.
|
||||
// Run both versions of the calculation to attempt to get more info.
|
||||
debug_verify = true;
|
||||
self.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.update_accounts_hash_with_index_option(
|
||||
use_index,
|
||||
debug_verify,
|
||||
self.slot(),
|
||||
&self.ancestors,
|
||||
Some(self.capitalization()),
|
||||
self.epoch_schedule(),
|
||||
&self.rent_collector,
|
||||
is_startup,
|
||||
);
|
||||
self.rc.accounts.accounts_db.update_accounts_hash(
|
||||
use_index,
|
||||
debug_verify,
|
||||
self.slot(),
|
||||
&self.ancestors,
|
||||
Some(self.capitalization()),
|
||||
self.epoch_schedule(),
|
||||
&self.rent_collector,
|
||||
is_startup,
|
||||
);
|
||||
}
|
||||
|
||||
panic!(
|
||||
|
|
Loading…
Reference in New Issue