fix params for store_accounts_frozen (#23312)
This commit is contained in:
parent
227df52213
commit
7ee549e5ae
|
@ -2782,8 +2782,7 @@ impl AccountsDb {
|
||||||
// without use of rather wide locks in this whole function, because we're
|
// without use of rather wide locks in this whole function, because we're
|
||||||
// mutating rooted slots; There should be no writers to them.
|
// mutating rooted slots; There should be no writers to them.
|
||||||
store_accounts_timing = self.store_accounts_frozen(
|
store_accounts_timing = self.store_accounts_frozen(
|
||||||
slot,
|
(slot, &accounts[..]),
|
||||||
&accounts,
|
|
||||||
Some(&hashes),
|
Some(&hashes),
|
||||||
Some(Box::new(move |_, _| shrunken_store.clone())),
|
Some(Box::new(move |_, _| shrunken_store.clone())),
|
||||||
Some(Box::new(write_versions.into_iter())),
|
Some(Box::new(write_versions.into_iter())),
|
||||||
|
@ -4811,8 +4810,7 @@ impl AccountsDb {
|
||||||
let flushed_store =
|
let flushed_store =
|
||||||
self.create_and_insert_store(slot, aligned_total_size, "flush_slot_cache");
|
self.create_and_insert_store(slot, aligned_total_size, "flush_slot_cache");
|
||||||
self.store_accounts_frozen(
|
self.store_accounts_frozen(
|
||||||
slot,
|
(slot, &accounts[..]),
|
||||||
&accounts,
|
|
||||||
Some(&hashes),
|
Some(&hashes),
|
||||||
Some(Box::new(move |_, _| flushed_store.clone())),
|
Some(Box::new(move |_, _| flushed_store.clone())),
|
||||||
None,
|
None,
|
||||||
|
@ -6447,8 +6445,7 @@ impl AccountsDb {
|
||||||
|
|
||||||
fn store_accounts_frozen<'a, T: ReadableAccount + Sync + ZeroLamport>(
|
fn store_accounts_frozen<'a, T: ReadableAccount + Sync + ZeroLamport>(
|
||||||
&'a self,
|
&'a self,
|
||||||
slot: Slot,
|
accounts: impl StorableAccounts<'a, T>,
|
||||||
accounts: &[(&Pubkey, &T)],
|
|
||||||
hashes: Option<&[impl Borrow<Hash>]>,
|
hashes: Option<&[impl Borrow<Hash>]>,
|
||||||
storage_finder: Option<StorageFinder<'a>>,
|
storage_finder: Option<StorageFinder<'a>>,
|
||||||
write_version_producer: Option<Box<dyn Iterator<Item = StoredMetaWriteVersion>>>,
|
write_version_producer: Option<Box<dyn Iterator<Item = StoredMetaWriteVersion>>>,
|
||||||
|
@ -6459,7 +6456,7 @@ impl AccountsDb {
|
||||||
let reset_accounts = false;
|
let reset_accounts = false;
|
||||||
let is_cached_store = false;
|
let is_cached_store = false;
|
||||||
self.store_accounts_custom(
|
self.store_accounts_custom(
|
||||||
(slot, accounts),
|
accounts,
|
||||||
hashes,
|
hashes,
|
||||||
storage_finder,
|
storage_finder,
|
||||||
write_version_producer,
|
write_version_producer,
|
||||||
|
@ -6893,7 +6890,7 @@ impl AccountsDb {
|
||||||
.map(|key| (key, &account))
|
.map(|key| (key, &account))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let hashes = (0..filler_entries).map(|_| hash).collect::<Vec<_>>();
|
let hashes = (0..filler_entries).map(|_| hash).collect::<Vec<_>>();
|
||||||
self.store_accounts_frozen(*slot, &add[..], Some(&hashes[..]), None, None);
|
self.store_accounts_frozen((*slot, &add[..]), Some(&hashes[..]), None, None);
|
||||||
});
|
});
|
||||||
self.accounts_index.set_startup(false);
|
self.accounts_index.set_startup(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue