feature: add conditional support for serde

This commit is contained in:
Augusto F. Hack
2023-08-08 17:04:25 +02:00
parent 03f89f0aff
commit 8cf5e9fd2c
18 changed files with 204 additions and 14 deletions

View File

@@ -8,6 +8,7 @@ use winter_math::log2;
/// A fully-balanced binary Merkle tree (i.e., a tree where the number of leaves is a power of two).
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct MerkleTree {
nodes: Vec<RpoDigest>,
}