pub trait InspectCommitEvm: InspectEvm + ExecuteCommitEvm {
// Provided methods
fn inspect_tx_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error> { ... }
fn inspect_commit(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error> { ... }
}Expand description
InspectCommitEvm is a API that allows inspecting similar to InspectEvm but it has
functions that commit the state diff to the database.
Functions return CommitOutput from ExecuteCommitEvm trait.
Provided Methods§
Sourcefn inspect_tx_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_tx_commit( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
Inspect the EVM with the current inspector and previous transaction by replaying, similar to InspectEvm::inspect_tx
and commit the state diff to the database.
§Outcome of Error
If the transaction fails, the journal is finalized (not committed) so it does not leak into the next transaction.
Sourcefn inspect_commit(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_commit( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>
Inspect the EVM with the given transaction and inspector similar to InspectEvm::inspect
and commit the state diff to the database.
§Outcome of Error
Same as InspectCommitEvm::inspect_tx_commit: the journal is finalized on error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".