mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Minor fixes
This commit is contained in:
parent
8590407764
commit
fd3e8bcd4c
@ -246,7 +246,7 @@ fn compute_evaluation<F: Field>(
|
||||
// The answer is gotten by interpolating {(x*g^i, P(x*g^i))} and evaluating at beta.
|
||||
let points = g
|
||||
.powers()
|
||||
.zip(evals.into_iter())
|
||||
.zip(evals)
|
||||
.map(|(y, e)| (x * y, e))
|
||||
.collect::<Vec<_>>();
|
||||
let barycentric_weights = barycentric_weights(&points);
|
||||
|
||||
@ -29,6 +29,11 @@ pub(crate) fn verify_merkle_proof<F: Field>(
|
||||
proof: &MerkleProof<F>,
|
||||
reverse_bits: bool,
|
||||
) -> Result<()> {
|
||||
ensure!(
|
||||
leaf_index >> proof.siblings.len() == 0,
|
||||
"Merkle leaf index is too large."
|
||||
);
|
||||
|
||||
let index = if reverse_bits {
|
||||
crate::util::reverse_bits(leaf_index, proof.siblings.len())
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user