collapse some bank test creation fns (#26532)

This commit is contained in:
Jeff Washington (jwash) 2022-07-10 17:51:38 -05:00 committed by GitHub
parent 105c7e19e1
commit 1babf460ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 16 deletions

View File

@ -1445,35 +1445,21 @@ impl Bank {
}
pub fn new_for_tests(genesis_config: &GenesisConfig) -> Self {
Self::new_with_paths_for_tests(
Self::new_with_config_for_tests(
genesis_config,
Vec::new(),
None,
None,
AccountSecondaryIndexes::default(),
false,
AccountShrinkThreshold::default(),
false,
)
}
pub fn new_no_wallclock_throttle_for_tests(genesis_config: &GenesisConfig) -> Self {
let mut bank = Self::new_with_paths_for_tests(
genesis_config,
Vec::new(),
None,
None,
AccountSecondaryIndexes::default(),
false,
AccountShrinkThreshold::default(),
false,
);
let mut bank = Self::new_for_tests(genesis_config);
bank.ns_per_slot = std::u128::MAX;
bank
}
#[cfg(test)]
pub(crate) fn new_with_config_for_tests(
genesis_config: &GenesisConfig,
account_indexes: AccountSecondaryIndexes,