-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Merkle tree bug fix #500
Conversation
} else if num_leaves == 0 { | ||
Ok((Arc::new(MerkleNode::<E, u64, T>::Empty), height, 0)) | ||
} else if height == 0usize { | ||
Ok(( | ||
Arc::new(MerkleNode::Leaf { | ||
value: H::digest_leaf(&0, leaves[0].borrow())?, | ||
pos: 0, | ||
elem: leaves[0].borrow().clone(), | ||
}), | ||
height, | ||
1, | ||
)) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy pasta 😕
// singleton merkle tree test (#499) | ||
let mt = RescueLightWeightMerkleTree::<F>::from_elems(None, [F::from(0u64)]).unwrap(); | ||
let (elem, _) = mt.lookup(0).expect_ok().unwrap(); | ||
assert_eq!(elem, &F::from(0u64)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more copy pasta
cargo +nightly test --release -p jf-utils -- -Zunstable-options --report-time | ||
cargo +nightly test --release -p jf-plonk --lib --bins -- -Zunstable-options --report-time | ||
cargo +nightly test --release -p jf-primitives --features test-srs -- -Zunstable-options --report-time # enable test-srs feature for gen_srs_for_testing | ||
cargo +nightly test --release -p jf-relation -- -Zunstable-options --report-time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for removing nightly!
Description
closes: #499
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer