We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a661583 commit b2a9720Copy full SHA for b2a9720
crates/evm/src/block/mod.rs
@@ -112,6 +112,23 @@ pub trait BlockExecutor {
112
113
/// Exposes mutable reference to EVM.
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
132
}
133
134
/// A helper trait encapsulating the constraints on [`BlockExecutor`] produced by the
0 commit comments