@@ -9,7 +9,6 @@ use blockifier::blockifier::transaction_executor::{
9
9
BlockExecutionSummary ,
10
10
TransactionExecutionOutput ,
11
11
TransactionExecutor ,
12
- TransactionExecutorError ,
13
12
} ;
14
13
use blockifier:: context:: BlockContext ;
15
14
use blockifier:: state:: cached_state:: { CachedState , CommitmentStateDiff , StateMaps } ;
@@ -109,11 +108,17 @@ pub(crate) fn execute_transactions<S: FlowTestState>(
109
108
110
109
// Execute the transactions and make sure none of them failed.
111
110
let execution_deadline = None ;
112
- let execution_outputs = executor
113
- . execute_txs ( txs, execution_deadline)
114
- . into_iter ( )
115
- . collect :: < Result < _ , TransactionExecutorError > > ( )
116
- . expect ( "Unexpected error during execution." ) ;
111
+ let execution_results =
112
+ executor. execute_txs ( txs, execution_deadline) . into_iter ( ) . collect :: < Vec < Result < _ , _ > > > ( ) ;
113
+ let mut execution_outputs = Vec :: new ( ) ;
114
+ for ( tx_index, result) in execution_results. into_iter ( ) . enumerate ( ) {
115
+ match result {
116
+ Ok ( output) => execution_outputs. push ( output) ,
117
+ Err ( error) => {
118
+ panic ! ( "Unexpected error during execution of tx at index {tx_index}: {error:?}." ) ;
119
+ }
120
+ }
121
+ }
117
122
118
123
// Finalize the block to get the state diff.
119
124
let block_summary = executor. finalize ( ) . expect ( "Failed to finalize block." ) ;
0 commit comments