diff --git a/crypto-primitives/src/merkle_tree/constraints.rs b/crypto-primitives/src/merkle_tree/constraints.rs index 9a23c34..83ae4f5 100644 --- a/crypto-primitives/src/merkle_tree/constraints.rs +++ b/crypto-primitives/src/merkle_tree/constraints.rs @@ -1,6 +1,6 @@ use crate::{ crh::{CRHSchemeGadget, TwoToOneCRHSchemeGadget}, - merkle_tree::{Config, Path}, + merkle_tree::{Config, IdentityDigestConverter, Path}, }; use ark_ff::PrimeField; use ark_r1cs_std::prelude::*; @@ -9,15 +9,11 @@ use ark_relations::r1cs::{Namespace, SynthesisError}; use ark_std::vec::Vec; use ark_std::{borrow::Borrow, fmt::Debug}; -#[cfg(test)] -use crate::merkle_tree::IdentityDigestConverter; - pub trait DigestVarConverter { type TargetType: Borrow; fn convert(from: From) -> Result; } -#[cfg(test)] impl DigestVarConverter for IdentityDigestConverter { type TargetType = T; diff --git a/crypto-primitives/src/merkle_tree/mod.rs b/crypto-primitives/src/merkle_tree/mod.rs index 7dcabfa..e11a176 100644 --- a/crypto-primitives/src/merkle_tree/mod.rs +++ b/crypto-primitives/src/merkle_tree/mod.rs @@ -48,12 +48,10 @@ pub trait DigestConverter { } /// A trivial converter where digest of previous layer's hash is the same as next layer's input. -#[cfg(test)] pub struct IdentityDigestConverter { _prev_layer_digest: T, } -#[cfg(test)] impl DigestConverter for IdentityDigestConverter { type TargetType = T; fn convert(item: T) -> Result {