type RewardMerkleNode = MerkleNode<RewardAmount, RewardAccountV2, KeccakNode>;Expand description
Merkle node containing a reward amount leaf.
Internal representation of tree nodes. Can be Empty, Leaf (account + amount), Branch (internal node with children), or ForgettenSubtree (sparse placeholder).
Aliased Type§
enum RewardMerkleNode {
Empty,
Branch {
value: KeccakNode,
children: Vec<Arc<MerkleNode<RewardAmount, RewardAccountV2, KeccakNode>>>,
},
Leaf {
value: KeccakNode,
pos: RewardAccountV2,
elem: RewardAmount,
},
ForgettenSubtree {
value: KeccakNode,
},
}Variants§
Empty
An empty subtree with no elements.
Branch
An internal branching node with children.
Fields
value: KeccakNodeMerkle hash value of this subtree
children: Vec<Arc<MerkleNode<RewardAmount, RewardAccountV2, KeccakNode>>>All its children nodes
Leaf
A leaf node containing an element.
Fields
value: KeccakNodeMerkle hash value of this leaf
pos: RewardAccountV2Index of this leaf in the tree
elem: RewardAmountAssociated element stored in this leaf
ForgettenSubtree
A subtree that has been forgotten from memory.
This variant retains only the hash value of the subtree, allowing the
tree commitment to remain valid while reducing memory usage.
Forgotten subtrees can be restored using the remember_internal
method if a valid proof is provided.
Fields
value: KeccakNodeMerkle hash value of this forgotten subtree