Struct primitives::state_root::StateRoot
source · pub struct StateRoot {
pub snapshot_root: MerkleHash,
pub intermediate_delta_root: MerkleHash,
pub delta_root: MerkleHash,
}
Expand description
The deferred state root consists of 3 parts: snapshot, delta_0, delta. when delta grows over threshold, snapshot and delta_0 is merged into new snapshot, and the delta becomes new delta_0.
Fields§
§snapshot_root: MerkleHash
§intermediate_delta_root: MerkleHash
§delta_root: MerkleHash
Implementations§
source§impl StateRoot
impl StateRoot
pub fn compute_state_root_hash(&self) -> H256
pub fn genesis(genesis_root: &MerkleHash) -> StateRoot
Trait Implementations§
source§impl<'de> Deserialize<'de> for StateRoot
impl<'de> Deserialize<'de> for StateRoot
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for StateRoot
impl PartialEq for StateRoot
impl Eq for StateRoot
impl StructuralPartialEq for StateRoot
Auto Trait Implementations§
impl RefUnwindSafe for StateRoot
impl Send for StateRoot
impl Sync for StateRoot
impl Unpin for StateRoot
impl UnwindSafe for StateRoot
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