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

@@ -745,7 +745,7 @@ impl<T: IndexValue> AccountsIndex<T> {
let storage = AccountsIndexStorage::new(bins);
let account_maps = (0..bins)
.into_iter()
.map(|bin| RwLock::new(Arc::new(InMemAccountsIndex::new(&storage, bin))))
.map(|bin| RwLock::new(Arc::clone(&storage.in_mem[bin])))
.collect::<Vec<_>>();
(account_maps, bin_calculator, storage)
}