@@ -9,7 +9,6 @@ use blockifier::blockifier::transaction_executor::{
99 BlockExecutionSummary ,
1010 TransactionExecutionOutput ,
1111 TransactionExecutor ,
12- TransactionExecutorError ,
1312} ;
1413use blockifier:: context:: BlockContext ;
1514use blockifier:: state:: cached_state:: { CachedState , CommitmentStateDiff , StateMaps } ;
@@ -109,11 +108,17 @@ pub(crate) fn execute_transactions<S: FlowTestState>(
109108
110109 // Execute the transactions and make sure none of them failed.
111110 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+ }
117122
118123 // Finalize the block to get the state diff.
119124 let block_summary = executor. finalize ( ) . expect ( "Failed to finalize block." ) ;
0 commit comments