Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed May 18, 2023
1 parent c13b1cb commit c3a9b77
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6293,7 +6293,7 @@ fn test_transaction_with_program_ids_passed_to_programs() {
fn test_account_ids_after_program_ids() {
solana_logger::setup();
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new_for_tests(&genesis_config);
let bank = Bank::new_for_tests(&genesis_config);

let from_pubkey = solana_sdk::pubkey::new_rand();
let to_pubkey = solana_sdk::pubkey::new_rand();
Expand All @@ -6313,6 +6313,9 @@ fn test_account_ids_after_program_ids() {

tx.message.account_keys.push(solana_sdk::pubkey::new_rand());

let slot = bank.slot().saturating_add(1);
let mut bank = Bank::new_from_parent(&Arc::new(bank), &Pubkey::default(), slot);

bank.add_mockup_builtin(solana_vote_program::id(), process_instruction);
let result = bank.process_transaction(&tx);
assert_eq!(result, Ok(()));
Expand Down Expand Up @@ -6458,7 +6461,7 @@ fn test_program_id_as_payer() {
#[test]
fn test_ref_account_key_after_program_id() {
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new_for_tests(&genesis_config);
let bank = Bank::new_for_tests(&genesis_config);

let from_pubkey = solana_sdk::pubkey::new_rand();
let to_pubkey = solana_sdk::pubkey::new_rand();
Expand All @@ -6468,6 +6471,9 @@ fn test_ref_account_key_after_program_id() {
AccountMeta::new(to_pubkey, false),
];

let slot = bank.slot().saturating_add(1);
let mut bank = Bank::new_from_parent(&Arc::new(bank), &Pubkey::default(), slot);

bank.add_mockup_builtin(solana_vote_program::id(), process_instruction);

let instruction = Instruction::new_with_bincode(solana_vote_program::id(), &10, account_metas);
Expand Down

0 comments on commit c3a9b77

Please sign in to comment.