Skip to main content

InspectCommitEvm

Trait InspectCommitEvm 

Source
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§

Source

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.

Source

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".

Implementations on Foreign Types§

Source§

impl<CTX, INSP, INST, PRECOMPILES> InspectCommitEvm for Evm<CTX, INSP, INST, PRECOMPILES, EthFrame<EthInterpreter>>
where CTX: ContextSetters + ContextTr<Journal: JournalTr<State = EvmState> + JournalExt, Db: DatabaseCommit>, INSP: Inspector<CTX, EthInterpreter>, INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>, PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,

Implementors§