Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Jun 18, 2024
1 parent 583d653 commit 24a66aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions programs/sbf/tests/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,5 @@ fn test_no_panic_rpc_client() {
blockhash,
);

rpc_client
.send_and_confirm_transaction(&transaction)
.unwrap();
rpc_client.simulate_transaction(&transaction).unwrap();
}
10 changes: 6 additions & 4 deletions programs/sbf/tests/sysvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use {
solana_sdk::{
feature_set::disable_fees_sysvar,
instruction::{AccountMeta, Instruction},
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
sysvar::{
Expand Down Expand Up @@ -72,9 +71,12 @@ fn test_sysvar_syscalls() {
AccountMeta::new_readonly(epoch_rewards::id(), false),
],
);
let blockhash = bank.last_blockhash();
let message = Message::new(&[instruction], Some(&mint_keypair.pubkey()));
let transaction = Transaction::new(&[&mint_keypair], message, blockhash);
let transaction = Transaction::new_signed_with_payer(
&[instruction],
Some(&mint_keypair.pubkey()),
&[&mint_keypair],
bank.last_blockhash(),
);
let sanitized_tx = SanitizedTransaction::from_transaction_for_tests(transaction);
let result = bank.simulate_transaction(&sanitized_tx, false);
assert!(result.result.is_ok());
Expand Down

0 comments on commit 24a66aa

Please sign in to comment.