@@ -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 } ;
@@ -114,11 +113,17 @@ pub(crate) fn execute_transactions<S: FlowTestState>(
114113
115114 // Execute the transactions and make sure none of them failed.
116115 let execution_deadline = None ;
117- let execution_outputs = executor
118- . execute_txs ( txs, execution_deadline)
119- . into_iter ( )
120- . collect :: < Result < _ , TransactionExecutorError > > ( )
121- . expect ( "Unexpected error during execution." ) ;
116+ let execution_results =
117+ executor. execute_txs ( txs, execution_deadline) . into_iter ( ) . collect :: < Vec < Result < _ , _ > > > ( ) ;
118+ let mut execution_outputs = Vec :: new ( ) ;
119+ for ( tx_index, result) in execution_results. into_iter ( ) . enumerate ( ) {
120+ match result {
121+ Ok ( output) => execution_outputs. push ( output) ,
122+ Err ( error) => {
123+ panic ! ( "Unexpected error during execution of tx at index {tx_index}: {error:?}." ) ;
124+ }
125+ }
126+ }
122127
123128 // Finalize the block to get the state diff.
124129 let block_summary = executor. finalize ( ) . expect ( "Failed to finalize block." ) ;
0 commit comments