add <T> through accounts index (#19852)

This commit is contained in:
Jeff Washington (jwash)
2021-09-13 22:59:03 -05:00
committed by GitHub
parent 4fdd70c931
commit 910f241c3f
4 changed files with 24 additions and 17 deletions

View File

@@ -22,12 +22,12 @@ type K = Pubkey;
pub struct InMemAccountsIndex<T: IsCached> {
// backing store
map: HashMap<Pubkey, AccountMapEntry<T>>,
storage: Arc<BucketMapHolder>,
storage: Arc<BucketMapHolder<T>>,
bin: usize,
}
impl<T: IsCached> InMemAccountsIndex<T> {
pub fn new(storage: &AccountsIndexStorage, bin: usize) -> Self {
pub fn new(storage: &AccountsIndexStorage<T>, bin: usize) -> Self {
Self {
map: HashMap::new(),
storage: storage.storage().clone(),
@@ -35,7 +35,7 @@ impl<T: IsCached> InMemAccountsIndex<T> {
}
}
pub fn new_bucket_map_holder() -> Arc<BucketMapHolder> {
pub fn new_bucket_map_holder() -> Arc<BucketMapHolder<T>> {
Arc::new(BucketMapHolder::new())
}