AccountsIndexStorage holds InMemAccountsIndex[] (#19947)

This commit is contained in:
Jeff Washington (jwash)
2021-09-16 16:12:22 -05:00
committed by GitHub
parent 49d3d79459
commit 66e0fafc21
4 changed files with 12 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
use crate::accounts_index::{
AccountMapEntry, AccountMapEntryInner, IndexValue, SlotList, WriteAccountMapEntry,
};
use crate::accounts_index_storage::AccountsIndexStorage;
use crate::bucket_map_holder::BucketMapHolder;
use crate::bucket_map_holder_stats::BucketMapHolderStats;
use solana_measure::measure::Measure;
@@ -29,10 +28,10 @@ impl<T: IndexValue> Debug for InMemAccountsIndex<T> {
}
impl<T: IndexValue> InMemAccountsIndex<T> {
pub fn new(storage: &AccountsIndexStorage<T>, bin: usize) -> Self {
pub fn new(storage: &Arc<BucketMapHolder<T>>, bin: usize) -> Self {
Self {
map_internal: RwLock::default(),
storage: storage.storage().clone(),
storage: Arc::clone(storage),
bin,
}
}