Function hpl_utils::merkle_tree::verify_merkle
source · pub fn verify_merkle(
proof: Vec<[u8; 32]>,
root: [u8; 32],
leaf: [u8; 32]
) -> bool
Expand description
Returns true if a leaf
can be proved to be a part of a Merkle tree
defined by root
. For this, a proof
must be provided, containing
sibling hashes on the branch from the leaf to the root of the tree. Each
pair of leaves and each pair of pre-images are assumed to be sorted.