File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,23 @@ pub trait BlockExecutor {
112
112
113
113
/// Exposes mutable reference to EVM.
114
114
fn evm_mut ( & mut self ) -> & mut Self :: Evm ;
115
+
116
+ /// Executes all transactions in a block, applying pre and post execution changes.
117
+ fn execute_block (
118
+ mut self ,
119
+ transactions : impl IntoIterator < Item = impl ExecutableTx < Self > > ,
120
+ ) -> Result < BlockExecutionResult < Self :: Receipt > , BlockExecutionError >
121
+ where
122
+ Self : Sized ,
123
+ {
124
+ self . apply_pre_execution_changes ( ) ?;
125
+
126
+ for tx in transactions {
127
+ self . execute_transaction ( tx) ?;
128
+ }
129
+
130
+ self . apply_post_execution_changes ( )
131
+ }
115
132
}
116
133
117
134
/// A helper trait encapsulating the constraints on [`BlockExecutor`] produced by the
You can’t perform that action at this time.
0 commit comments