Update SBF bench to account for delay visibility (#31501)

This commit is contained in:
Pankaj Garg 2023-05-04 17:17:02 -07:00 committed by GitHub
parent 0e0c91faac
commit cc24d2207c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -196,9 +196,12 @@ fn bench_program_execute_noop(bencher: &mut Bencher) {
} = create_genesis_config(50);
let bank = Bank::new_for_benches(&genesis_config);
let bank = Arc::new(bank);
let bank_client = BankClient::new_shared(&bank);
let mut bank_client = BankClient::new_shared(&bank);
let invoke_program_id = load_program(&bank_client, &bpf_loader::id(), &mint_keypair, "noop");
let bank = bank_client
.advance_slot(1, &Pubkey::default())
.expect("Failed to advance the slot");
let mint_pubkey = mint_keypair.pubkey();
let account_metas = vec![AccountMeta::new(mint_pubkey, true)];