mirror of https://github.com/vacp2p/zerokit.git
feat(rln): add debug impl for PoseidonHash
This commit is contained in:
parent
9b5cd131c6
commit
ccdf1e75d7
|
@ -2,8 +2,8 @@
|
||||||
#![allow(unused_imports)]
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
pub mod ffi;
|
pub mod ffi;
|
||||||
pub mod identity;
|
|
||||||
pub mod hash;
|
pub mod hash;
|
||||||
|
pub mod identity;
|
||||||
pub mod merkle_tree;
|
pub mod merkle_tree;
|
||||||
pub mod poseidon_tree;
|
pub mod poseidon_tree;
|
||||||
pub mod public;
|
pub mod public;
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub type Branch = merkle_tree::Branch<PoseidonHash>;
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub type Proof = merkle_tree::Proof<PoseidonHash>;
|
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;
|
pub struct PoseidonHash;
|
||||||
|
|
||||||
#[allow(clippy::fallible_impl_from)] // TODO
|
#[allow(clippy::fallible_impl_from)] // TODO
|
||||||
|
@ -70,6 +70,10 @@ pub mod test {
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
let proof = tree.proof(3).expect("proof should exist");
|
let proof = tree.proof(3).expect("proof should exist");
|
||||||
|
|
||||||
|
//println!("Proof {:#?}", proof);
|
||||||
|
//println!("Tree {:#?}", tree);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
proof,
|
proof,
|
||||||
crate::merkle_tree::Proof(vec![
|
crate::merkle_tree::Proof(vec![
|
||||||
|
|
Loading…
Reference in New Issue