mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 22:57:59 -05:00
fix broken smt tests
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user