cfx_internal_common/
consensus_api.rs

1// Copyright 2020 Conflux Foundation. All rights reserved.
2// Conflux is free software and distributed under GNU General Public License.
3// See http://www.gnu.org/licenses/
4
5use crate::epoch_execution_commitment::EpochExecutionCommitment;
6use primitives::EpochId;
7
8pub trait StateMaintenanceTrait {
9    fn get_pivot_hash_from_epoch_number(
10        &self, epoch_number: u64,
11    ) -> Result<EpochId, String>;
12
13    fn get_epoch_execution_commitment_with_db(
14        &self, block_hash: &EpochId,
15    ) -> Option<EpochExecutionCommitment>;
16}