Function check_membership_with_hasher
pub fn check_membership_with_hasher<let TREE_HEIGHT: u32>(
leaf: Field,
membership_witness: MembershipWitness<TREE_HEIGHT>,
root: Field,
hasher: fn(Field, Field) -> Field,
) -> bool
pub fn check_membership_with_hasher<let TREE_HEIGHT: u32>(
leaf: Field,
membership_witness: MembershipWitness<TREE_HEIGHT>,
root: Field,
hasher: fn(Field, Field) -> Field,
) -> bool
Check whether a leaf exists in the tree with the given
root. Same ascheck_membershipbut uses a custom hasher.membership_witnessis a hint to prove that theleafexists in the tree with the givenroot.Returns:
trueif the leaf exists in the tree,falseotherwise.