fix broken smt tests

This commit is contained in:
zero
2024-03-12 16:06:04 +01:00
parent f92b55d16e
commit db67d3bdf0
2 changed files with 4 additions and 4 deletions

View File

@@ -322,12 +322,12 @@ mod tests {
fn test_smt_circuit() {
let hasher = Poseidon::<Fp, 2>::hasher();
let leaves: [Fp; HEIGHT] = [(); HEIGHT].map(|_| Fp::random(&mut OsRng));
let empty_leaf = [0u8; 64];
let empty_leaf = [0u8; 32];
let smt = SparseMerkleTree::<Fp, Poseidon<Fp, 2>, HEIGHT>::new_sequential(
&leaves,
&hasher.clone(),
&empty_leaf,
empty_leaf,
)
.unwrap();

View File

@@ -40,13 +40,13 @@ fn zkvm_smt() -> Result<()> {
let zkbin = ZkBinary::decode(bincode)?;
let poseidon = Poseidon::<Fp, 2>::new();
let empty_leaf = [0u8; 64];
let empty_leaf = [0u8; 32];
let leaves = [Fp::random(&mut OsRng), Fp::random(&mut OsRng), Fp::random(&mut OsRng)];
let smt = SparseMerkleTree::<Fp, Poseidon<Fp, 2>, SPARSE_MERKLE_DEPTH>::new_sequential(
&leaves,
&poseidon.clone(),
&empty_leaf,
empty_leaf,
)
.unwrap();