[][src]Trait execution_correctness::ExecutionCorrectness

pub trait ExecutionCorrectness: Send {
    fn committed_block_id(&mut self) -> Result<HashValue, Error>;
fn reset(&mut self) -> Result<(), Error>;
fn execute_block(
        &mut self,
        block: Block,
        parent_block_id: HashValue
    ) -> Result<StateComputeResult, Error>;
fn commit_blocks(
        &mut self,
        block_ids: Vec<HashValue>,
        ledger_info_with_sigs: LedgerInfoWithSignatures
    ) -> Result<(Vec<Transaction>, Vec<ContractEvent>), Error>; }

Interface for ExecutionCorrectness. It is basically the same as BlockExecutor except some interfaces will return signature with result.

Required methods

fn committed_block_id(&mut self) -> Result<HashValue, Error>

fn reset(&mut self) -> Result<(), Error>

fn execute_block(
    &mut self,
    block: Block,
    parent_block_id: HashValue
) -> Result<StateComputeResult, Error>

Executes a block.

fn commit_blocks(
    &mut self,
    block_ids: Vec<HashValue>,
    ledger_info_with_sigs: LedgerInfoWithSignatures
) -> Result<(Vec<Transaction>, Vec<ContractEvent>), Error>

Loading content...

Implementors

Loading content...