pub trait Executor: Send + Sync {
    type Database;
    type TxSource;

    // Required methods
    fn execute_without_commit(
        &self,
        component: Components<Self::TxSource>
    ) -> ExecutorResult<UncommittedResult<StorageTransaction<Self::Database>>>;
    fn dry_run(
        &self,
        block: Components<Transaction>,
        utxo_validation: Option<bool>
    ) -> ExecutorResult<Vec<Vec<Receipt>>>;
}

Required Associated Types§

source

type Database

The database used by the executor.

source

type TxSource

The source of transaction used by the executor.

Required Methods§

source

fn execute_without_commit( &self, component: Components<Self::TxSource> ) -> ExecutorResult<UncommittedResult<StorageTransaction<Self::Database>>>

Executes the block and returns the result of execution with uncommitted database transaction.

source

fn dry_run( &self, block: Components<Transaction>, utxo_validation: Option<bool> ) -> ExecutorResult<Vec<Vec<Receipt>>>

Executes the block without committing it to the database. During execution collects the receipts to return them. The utxo_validation field can be used to disable the validation of utxos during execution.

Implementors§