Skip to content

Commit

Permalink
collapse some bank test creation fns
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Jul 10, 2022
1 parent c99d9f0 commit 97ac2e0
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1445,29 +1445,16 @@ impl Bank {
}

pub fn new_for_tests(genesis_config: &GenesisConfig) -> Self {
Self::new_with_paths_for_tests(
Self::new_with_config(
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
Expand Down

0 comments on commit 97ac2e0

Please sign in to comment.