Allow unbounded wallclock processing time in tests (#15961) (#15966)

(cherry picked from commit f548a04fae)

Co-authored-by: carllin <carl@solana.com>
This commit is contained in:
mergify[bot]
2021-03-18 00:22:06 +00:00
committed by GitHub
parent 5b2a65fab3
commit 2bc21ecba2
2 changed files with 20 additions and 10 deletions

View File

@@ -902,6 +902,21 @@ impl Bank {
)
}
pub fn new_no_wallclock_throttle(genesis_config: &GenesisConfig) -> Self {
let mut bank = Self::new_with_paths(
&genesis_config,
Vec::new(),
&[],
None,
None,
HashSet::new(),
false,
);
bank.ns_per_slot = std::u128::MAX;
bank
}
#[cfg(test)]
pub(crate) fn new_with_config(
genesis_config: &GenesisConfig,