mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +00:00
Other fixes
This commit is contained in:
parent
1d013b95dd
commit
f7256a6efc
@ -63,7 +63,7 @@ fn fill_subtree<F: RichField, H: Hasher<F>>(
|
|||||||
) -> H::Hash {
|
) -> H::Hash {
|
||||||
assert_eq!(leaves.len(), digests_buf.len() / 2 + 1);
|
assert_eq!(leaves.len(), digests_buf.len() / 2 + 1);
|
||||||
if digests_buf.is_empty() {
|
if digests_buf.is_empty() {
|
||||||
H::hash_no_pad(&leaves[0])
|
H::hash_or_noop(&leaves[0])
|
||||||
} else {
|
} else {
|
||||||
// Layout is: left recursive output || left child digest
|
// Layout is: left recursive output || left child digest
|
||||||
// || right child digest || right recursive output.
|
// || right child digest || right recursive output.
|
||||||
@ -99,7 +99,7 @@ fn fill_digests_buf<F: RichField, H: Hasher<F>>(
|
|||||||
.par_iter_mut()
|
.par_iter_mut()
|
||||||
.zip(leaves)
|
.zip(leaves)
|
||||||
.for_each(|(cap_buf, leaf)| {
|
.for_each(|(cap_buf, leaf)| {
|
||||||
cap_buf.write(H::hash_no_pad(leaf));
|
cap_buf.write(H::hash_or_noop(leaf));
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ pub(crate) fn decompress_merkle_proofs<F: RichField, H: Hasher<F>>(
|
|||||||
|
|
||||||
for (&i, v) in leaves_indices.iter().zip(leaves_data) {
|
for (&i, v) in leaves_indices.iter().zip(leaves_data) {
|
||||||
// Observe the leaves.
|
// Observe the leaves.
|
||||||
seen.insert(i + num_leaves, H::hash_no_pad(v));
|
seen.insert(i + num_leaves, H::hash_or_noop(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterators over the siblings.
|
// Iterators over the siblings.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user