1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use consensus_types::block::Block;
use diem_crypto::HashValue;
use diem_types::ledger_info::LedgerInfoWithSignatures;
use executor_types::{Error, StateComputeResult};
pub trait ExecutionCorrectness: Send {
fn committed_block_id(&self) -> Result<HashValue, Error>;
fn reset(&self) -> Result<(), Error>;
fn execute_block(
&self,
block: Block,
parent_block_id: HashValue,
) -> Result<StateComputeResult, Error>;
fn commit_blocks(
&self,
block_ids: Vec<HashValue>,
ledger_info_with_sigs: LedgerInfoWithSignatures,
) -> Result<(), Error>;
}