pub struct SparseMerkleTreeWithHistory<'a, L: Serialize + DeserializeOwned + Clone + Debug + PartialEq + PrimaryKey<'a>, H: Hasher<L>> {
    pub tree: SparseMerkleTree<'a, L, H>,
    pub root_history: Map<'a, L, Empty>,
}
Expand description

Like SparseMerkleTree but able to check valid root hash with all previous root hashes.

Fields

tree: SparseMerkleTree<'a, L, H>root_history: Map<'a, L, Empty>

Implementations

Trait Implementations

Initize the tree.
Check if the root is valid for the tree.
Insert the leaf into the next index slot of the tree. Return the leaf’s index and the updated root. Read more
Get the latest root of the tree.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.