Moves in_mem_accounts_index.rs into accounts_index directory (#35360)
This commit is contained in:
parent
c9c2fbbdd6
commit
83de6a5930
|
@ -41,10 +41,11 @@ use {
|
|||
ZeroLamportAccounts,
|
||||
},
|
||||
accounts_index::{
|
||||
AccountMapEntry, AccountSecondaryIndexes, AccountsIndex, AccountsIndexConfig,
|
||||
AccountsIndexRootsStats, AccountsIndexScanResult, DiskIndexValue, IndexKey, IndexValue,
|
||||
IsCached, RefCount, ScanConfig, ScanResult, SlotList, UpsertReclaim, ZeroLamport,
|
||||
ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS, ACCOUNTS_INDEX_CONFIG_FOR_TESTING,
|
||||
in_mem_accounts_index::StartupStats, AccountMapEntry, AccountSecondaryIndexes,
|
||||
AccountsIndex, AccountsIndexConfig, AccountsIndexRootsStats, AccountsIndexScanResult,
|
||||
DiskIndexValue, IndexKey, IndexValue, IsCached, RefCount, ScanConfig, ScanResult,
|
||||
SlotList, UpsertReclaim, ZeroLamport, ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS,
|
||||
ACCOUNTS_INDEX_CONFIG_FOR_TESTING,
|
||||
},
|
||||
accounts_index_storage::Startup,
|
||||
accounts_partition::RentPayingAccountsByPartition,
|
||||
|
@ -62,7 +63,6 @@ use {
|
|||
},
|
||||
contains::Contains,
|
||||
epoch_accounts_hash::EpochAccountsHashManager,
|
||||
in_mem_accounts_index::StartupStats,
|
||||
partitioned_rewards::{PartitionedEpochRewardsConfig, TestPartitionedEpochRewards},
|
||||
pubkey_bins::PubkeyBinCalculator24,
|
||||
read_only_accounts_cache::ReadOnlyAccountsCache,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub(crate) mod in_mem_accounts_index;
|
||||
use {
|
||||
crate::{
|
||||
accounts_index_storage::{AccountsIndexStorage, Startup},
|
||||
|
@ -5,13 +6,13 @@ use {
|
|||
ancestors::Ancestors,
|
||||
bucket_map_holder::{Age, AtomicAge, BucketMapHolder},
|
||||
contains::Contains,
|
||||
in_mem_accounts_index::{InMemAccountsIndex, InsertNewEntryResults, StartupStats},
|
||||
inline_spl_token::{self, GenericTokenAccount},
|
||||
inline_spl_token_2022,
|
||||
pubkey_bins::PubkeyBinCalculator24,
|
||||
rolling_bit_field::RollingBitField,
|
||||
secondary_index::*,
|
||||
},
|
||||
in_mem_accounts_index::{InMemAccountsIndex, InsertNewEntryResults, StartupStats},
|
||||
log::*,
|
||||
rand::{thread_rng, Rng},
|
||||
rayon::{
|
||||
|
|
|
@ -326,7 +326,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
|||
|
||||
/// lookup 'pubkey' in index (in_mem or disk).
|
||||
/// call 'callback' whether found or not
|
||||
pub(crate) fn get_internal_inner<RT>(
|
||||
pub(super) fn get_internal_inner<RT>(
|
||||
&self,
|
||||
pubkey: &K,
|
||||
// return true if item should be added to in_mem cache
|
||||
|
@ -339,7 +339,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
|||
|
||||
/// lookup 'pubkey' in the index (in_mem or disk).
|
||||
/// call 'callback' whether found or not
|
||||
pub(crate) fn get_internal_cloned<RT>(
|
||||
pub(super) fn get_internal_cloned<RT>(
|
||||
&self,
|
||||
pubkey: &K,
|
||||
callback: impl for<'a> FnOnce(Option<AccountMapEntry<T>>) -> RT,
|
||||
|
@ -359,7 +359,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
|||
/// then the disk entry *must* also be added to the in-mem cache.
|
||||
///
|
||||
/// Prefer `get_internal_inner()` or `get_internal_cloned()` for safe alternatives.
|
||||
pub(crate) fn get_internal<RT>(
|
||||
pub(super) fn get_internal<RT>(
|
||||
&self,
|
||||
pubkey: &K,
|
||||
// return true if item should be added to in_mem cache
|
|
@ -1,8 +1,10 @@
|
|||
use {
|
||||
crate::{
|
||||
accounts_index::{AccountsIndexConfig, DiskIndexValue, IndexValue},
|
||||
accounts_index::{
|
||||
in_mem_accounts_index::InMemAccountsIndex, AccountsIndexConfig, DiskIndexValue,
|
||||
IndexValue,
|
||||
},
|
||||
bucket_map_holder::BucketMapHolder,
|
||||
in_mem_accounts_index::InMemAccountsIndex,
|
||||
waitable_condvar::WaitableCondvar,
|
||||
},
|
||||
std::{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
use {
|
||||
crate::{
|
||||
accounts_index::{AccountsIndexConfig, DiskIndexValue, IndexLimitMb, IndexValue},
|
||||
bucket_map_holder_stats::BucketMapHolderStats,
|
||||
accounts_index::{
|
||||
in_mem_accounts_index::{InMemAccountsIndex, StartupStats},
|
||||
AccountsIndexConfig, DiskIndexValue, IndexLimitMb, IndexValue,
|
||||
},
|
||||
bucket_map_holder_stats::BucketMapHolderStats,
|
||||
waitable_condvar::WaitableCondvar,
|
||||
},
|
||||
solana_bucket_map::bucket_map::{BucketMap, BucketMapConfig},
|
||||
|
|
|
@ -27,7 +27,6 @@ pub mod cache_hash_data_stats;
|
|||
pub mod contains;
|
||||
pub mod epoch_accounts_hash;
|
||||
pub mod hardened_unpack;
|
||||
pub mod in_mem_accounts_index;
|
||||
pub mod inline_spl_token;
|
||||
pub mod inline_spl_token_2022;
|
||||
pub mod partitioned_rewards;
|
||||
|
|
Loading…
Reference in New Issue