introduce Bank::new_for_tests (#19062)

This commit is contained in:
Jeff Washington (jwash)
2021-08-04 15:06:57 -05:00
committed by GitHub
parent ca14475085
commit 1ed12a07ab
4 changed files with 9 additions and 3 deletions

View File

@ -1048,6 +1048,12 @@ impl Default for BlockhashQueue {
impl Bank {
pub fn new(genesis_config: &GenesisConfig) -> Self {
// this will go away in a coming pr where many replacements in test code will get made
Self::new_for_tests(genesis_config)
}
pub fn new_for_tests(genesis_config: &GenesisConfig) -> Self {
// this will diverge
Self::new_with_paths(
genesis_config,
Vec::new(),

View File

@ -22,7 +22,7 @@ pub fn setup_bank_and_vote_pubkeys(num_vote_accounts: usize, stake: u64) -> (Ban
&validator_voting_keypairs,
vec![stake; validator_voting_keypairs.len()],
);
let bank = Bank::new(&genesis_config);
let bank = Bank::new_for_tests(&genesis_config);
(bank, vote_pubkeys)
}