Add dummy proof.rs file to avoid rustfmt failing

This commit is contained in:
Romain Ruetschi
2018-07-23 21:19:05 +02:00
parent 4211dc1bb7
commit 87fa79addd

View File

@ -8,11 +8,17 @@ use tree::Tree;
/// An inclusion proof represent the fact that a `value` is a member
/// of a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`.
#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))]
#[cfg_attr(
feature = "serialization-serde",
derive(Serialize, Deserialize)
)]
#[derive(Clone, Debug)]
pub struct Proof<T> {
/// The hashing algorithm used in the original `MerkleTree`
#[cfg_attr(feature = "serialization-serde", serde(with = "algorithm_serde"))]
#[cfg_attr(
feature = "serialization-serde",
serde(with = "algorithm_serde")
)]
pub algorithm: &'static Algorithm,
/// The hash of the root of the original `MerkleTree`
@ -151,7 +157,10 @@ impl<T> Proof<T> {
/// A `Lemma` holds the hash of a node, the hash of its sibling node,
/// and a sub lemma, whose `node_hash`, when combined with this `sibling_hash`
/// must be equal to this `node_hash`.
#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))]
#[cfg_attr(
feature = "serialization-serde",
derive(Serialize, Deserialize)
)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Lemma {
pub node_hash: Vec<u8>,
@ -238,7 +247,10 @@ impl Lemma {
}
/// Tags a value so that we know from which branch of a `Tree` (if any) it was found.
#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))]
#[cfg_attr(
feature = "serialization-serde",
derive(Serialize, Deserialize)
)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Positioned<T> {
/// The value was found in the left branch