diff --git a/src/lib.rs b/src/lib.rs index 972ea54..44c8995 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -724,7 +724,10 @@ impl LiteSVM { } } - pub fn simulate_transaction(&mut self, tx: VersionedTransaction) -> TransactionResult { + pub fn simulate_transaction( + &mut self, + tx: impl Into, + ) -> TransactionResult { let ExecutionResult { post_accounts: _, tx_result, @@ -733,9 +736,9 @@ impl LiteSVM { return_data, .. } = if self.sigverify { - self.execute_transaction(tx) + self.execute_transaction(tx.into()) } else { - self.execute_transaction_no_verify(tx) + self.execute_transaction_no_verify(tx.into()) }; let logs = self.log_collector.take().into_messages(); diff --git a/tests/stake_program.rs b/tests/stake_program.rs index ab57b9a..d28d525 100644 --- a/tests/stake_program.rs +++ b/tests/stake_program.rs @@ -173,7 +173,7 @@ fn get_minimum_delegation(svm: &mut LiteSVM, payer: &Keypair) -> u64 { svm.latest_blockhash(), ); let mut data = svm - .simulate_transaction(transaction.into()) + .simulate_transaction(transaction) .unwrap() .return_data .data;