Bank::default_for_tests() (#19084)

This commit is contained in:
Jeff Washington (jwash)
2021-08-05 11:53:29 -05:00
committed by GitHub
parent 24207a09ac
commit a9014ceceb
7 changed files with 12 additions and 7 deletions

View File

@ -25,7 +25,7 @@ fn bench_save_tower(bench: &mut Bencher) {
let vote_account_pubkey = &Pubkey::default();
let node_keypair = Arc::new(Keypair::new());
let heaviest_bank = BankForks::new(Bank::default()).working_bank();
let heaviest_bank = BankForks::new(Bank::default_for_tests()).working_bank();
let tower = Tower::new(
&node_keypair.pubkey(),
vote_account_pubkey,
@ -47,7 +47,7 @@ fn bench_generate_ancestors_descendants(bench: &mut Bencher) {
let vote_account_pubkey = &Pubkey::default();
let node_keypair = Arc::new(Keypair::new());
let heaviest_bank = BankForks::new(Bank::default()).working_bank();
let heaviest_bank = BankForks::new(Bank::default_for_tests()).working_bank();
let mut tower = Tower::new(
&node_keypair.pubkey(),
vote_account_pubkey,

View File

@ -2101,7 +2101,7 @@ mod tests {
fn test_should_process_or_forward_packets() {
let my_pubkey = solana_sdk::pubkey::new_rand();
let my_pubkey1 = solana_sdk::pubkey::new_rand();
let bank = Arc::new(Bank::default());
let bank = Arc::new(Bank::default_for_tests());
assert_matches!(
BankingStage::consume_or_forward_packets(&my_pubkey, None, Some(&bank), false, false),
BufferedPacketsDecision::Hold