Trait ExecuteCommitEvm

Source
pub trait ExecuteCommitEvm: ExecuteEvm {
    // Required method
    fn commit(&mut self, state: Self::State);

    // Provided methods
    fn commit_inner(&mut self) { ... }
    fn transact_commit(
        &mut self,
        tx: Self::Tx,
    ) -> Result<Self::ExecutionResult, Self::Error> { ... }
    fn transact_multi_commit(
        &mut self,
        txs: impl Iterator<Item = Self::Tx>,
    ) -> Result<Vec<Self::ExecutionResult>, Self::Error> { ... }
    fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error> { ... }
}
Expand description

Extension of the ExecuteEvm trait that adds a method that commits the state after execution.

Required Methods§

Source

fn commit(&mut self, state: Self::State)

Commit the state.

Provided Methods§

Source

fn commit_inner(&mut self)

Finalize the state and commit it to the database.

Internally calls finalize and commit functions.

Source

fn transact_commit( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>

Transact the transaction and commit to the state.

Source

fn transact_multi_commit( &mut self, txs: impl Iterator<Item = Self::Tx>, ) -> Result<Vec<Self::ExecutionResult>, Self::Error>

Transact multiple transactions and commit to the state.

Internally calls transact_multi and commit functions.

Source

fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error>

Replay the transaction and commit to the state.

Internally calls replay and commit functions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

fn commit(&mut self, state: Self::State)

Implementors§