Expand description
! The executor is used for block production and validation. Given a block, it will execute all the transactions contained in the block and persist changes to the underlying database as needed. In production mode, block fields like transaction commitments are set based on the executed txs. In validation mode, the processed block commitments are compared with the proposed block.
Fields§
§database: Database
§config: Config
Implementations§
source§impl Executor
impl Executor
sourcepub fn execute_and_commit(
&self,
block: ExecutionBlock
) -> Result<ExecutionResult, Error>
pub fn execute_and_commit(
&self,
block: ExecutionBlock
) -> Result<ExecutionResult, Error>
Executes the block and commits the result of the execution into the inner Database
.
Trait Implementations§
source§impl Executor<Database> for Executor
impl Executor<Database> for Executor
source§fn execute_without_commit(
&self,
block: ExecutionBlock
) -> Result<UncommittedResult<DBTransaction<Database>>, Error>
fn execute_without_commit(
&self,
block: ExecutionBlock
) -> Result<UncommittedResult<DBTransaction<Database>>, Error>
Executes the block and returns the result of execution with uncommitted database
transaction.
source§fn dry_run(
&self,
block: ExecutionBlock,
utxo_validation: Option<bool>
) -> Result<Vec<Vec<Receipt>>, Error>
fn dry_run(
&self,
block: ExecutionBlock,
utxo_validation: Option<bool>
) -> Result<Vec<Vec<Receipt>>, Error>
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.