rework bank test to specifically use BTreeMap (#19225)

This commit is contained in:
Jeff Washington (jwash) 2021-08-13 13:30:48 -05:00 committed by GitHub
parent 74cc2e5ffa
commit 1a3f29e22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -5738,9 +5738,7 @@ pub(crate) mod tests {
use crate::{
accounts_background_service::{AbsRequestHandler, SendDroppedBankCallback},
accounts_db::DEFAULT_ACCOUNTS_SHRINK_RATIO,
accounts_index::{
AccountIndex, AccountMap, AccountSecondaryIndexes, ScanError, ITER_BATCH_SIZE,
},
accounts_index::{AccountIndex, AccountSecondaryIndexes, ScanError, ITER_BATCH_SIZE},
ancestors::Ancestors,
genesis_utils::{
activate_all_features, bootstrap_validator_stake_lamports,
@ -7309,9 +7307,9 @@ pub(crate) mod tests {
}
}
fn map_to_test_bad_range() -> AccountMap<Pubkey, i8> {
let mut map: AccountMap<Pubkey, i8> = AccountMap::new();
// when empty, AccountMap (= std::collections::BTreeMap) doesn't sanitize given range...
fn map_to_test_bad_range() -> std::collections::BTreeMap<Pubkey, i8> {
let mut map = std::collections::BTreeMap::new();
// when empty, std::collections::BTreeMap doesn't sanitize given range...
map.insert(solana_sdk::pubkey::new_rand(), 1);
map
}