Struct cfx_storage::state_manager::StateIndex
source · pub struct StateIndex {
pub snapshot_epoch_id: EpochId,
pub snapshot_merkle_root: MerkleHash,
pub intermediate_epoch_id: EpochId,
pub intermediate_trie_root_merkle: MerkleHash,
pub maybe_intermediate_mpt_key_padding: Option<DeltaMptKeyPadding>,
pub epoch_id: EpochId,
pub delta_mpt_key_padding: DeltaMptKeyPadding,
pub maybe_delta_trie_height: Option<u32>,
pub maybe_height: Option<u64>,
}
Fields§
§snapshot_epoch_id: EpochId
§snapshot_merkle_root: MerkleHash
§intermediate_epoch_id: EpochId
§intermediate_trie_root_merkle: MerkleHash
§maybe_intermediate_mpt_key_padding: Option<DeltaMptKeyPadding>
§epoch_id: EpochId
§delta_mpt_key_padding: DeltaMptKeyPadding
§maybe_delta_trie_height: Option<u32>
§maybe_height: Option<u64>
Implementations§
source§impl StateIndex
impl StateIndex
pub fn height_to_delta_height(height: u64, snapshot_epoch_count: u32) -> u32
pub fn new_for_test_only_delta_mpt(epoch_id: &EpochId) -> Self
sourcepub fn new_for_next_epoch(
base_epoch_id: &EpochId,
state_root: &StateRootWithAuxInfo,
height: u64,
snapshot_epoch_count: u32
) -> Self
pub fn new_for_next_epoch( base_epoch_id: &EpochId, state_root: &StateRootWithAuxInfo, height: u64, snapshot_epoch_count: u32 ) -> Self
Height is used to check for shifting snapshot. The state root and height information should be provided from consensus.
pub fn new_for_readonly( epoch_id: &EpochId, state_root: &StateRootWithAuxInfo ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StateIndex
impl Send for StateIndex
impl Sync for StateIndex
impl Unpin for StateIndex
impl UnwindSafe for StateIndex
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more