remove AccountsIndex::default (#19082)

* accounts_db calls AccountsDb::new(bins)

* remove AccountsIndex::default
This commit is contained in:
Jeff Washington (jwash)
2021-08-05 11:38:53 -05:00
committed by GitHub
parent 5cf28689e6
commit 24207a09ac
3 changed files with 34 additions and 44 deletions

View File

@ -5,7 +5,7 @@ extern crate test;
use rand::{thread_rng, Rng};
use solana_runtime::{
accounts_db::AccountInfo,
accounts_index::{AccountSecondaryIndexes, AccountsIndex},
accounts_index::{AccountSecondaryIndexes, AccountsIndex, BINS_DEFAULT},
};
use solana_sdk::pubkey::{self, Pubkey};
use test::Bencher;
@ -18,7 +18,7 @@ fn bench_accounts_index(bencher: &mut Bencher) {
const NUM_FORKS: u64 = 16;
let mut reclaims = vec![];
let index = AccountsIndex::<AccountInfo>::default();
let index = AccountsIndex::<AccountInfo>::new(BINS_DEFAULT);
for f in 0..NUM_FORKS {
for pubkey in pubkeys.iter().take(NUM_PUBKEYS) {
index.upsert(