File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -4384,9 +4384,7 @@ impl Bank {
4384
4384
let post_simulation_accounts = loaded_transactions
4385
4385
. into_iter ( )
4386
4386
. next ( )
4387
- . unwrap ( )
4388
- . 0
4389
- . ok ( )
4387
+ . and_then ( |( loaded_transactions_res, _) | loaded_transactions_res. ok ( ) )
4390
4388
. map ( |loaded_transaction| {
4391
4389
loaded_transaction
4392
4390
. accounts
@@ -4406,7 +4404,12 @@ impl Bank {
4406
4404
4407
4405
debug ! ( "simulate_transaction: {:?}" , timings) ;
4408
4406
4409
- let execution_result = execution_results. pop ( ) . unwrap ( ) ;
4407
+ let execution_result =
4408
+ execution_results
4409
+ . pop ( )
4410
+ . unwrap_or ( TransactionExecutionResult :: NotExecuted (
4411
+ TransactionError :: InvalidProgramForExecution ,
4412
+ ) ) ;
4410
4413
let flattened_result = execution_result. flattened_result ( ) ;
4411
4414
let ( logs, return_data) = match execution_result {
4412
4415
TransactionExecutionResult :: Executed { details, .. } => {
You can’t perform that action at this time.
0 commit comments