feat(rln): add debug impl for PoseidonHash

This commit is contained in:
Oskar Thoren 2022-03-16 16:17:19 +08:00
parent 9b5cd131c6
commit ccdf1e75d7
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
2 changed files with 6 additions and 2 deletions

View File

@ -2,8 +2,8 @@
#![allow(unused_imports)]
pub mod ffi;
pub mod identity;
pub mod hash;
pub mod identity;
pub mod merkle_tree;
pub mod poseidon_tree;
pub mod public;

View File

@ -18,7 +18,7 @@ pub type Branch = merkle_tree::Branch<PoseidonHash>;
#[allow(dead_code)]
pub type Proof = merkle_tree::Proof<PoseidonHash>;
#[derive(Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct PoseidonHash;
#[allow(clippy::fallible_impl_from)] // TODO
@ -70,6 +70,10 @@ pub mod test {
))
);
let proof = tree.proof(3).expect("proof should exist");
//println!("Proof {:#?}", proof);
//println!("Tree {:#?}", tree);
assert_eq!(
proof,
crate::merkle_tree::Proof(vec![