Skip to content

Commit

Permalink
Derived Deserialize for Proof using associated type bound
Browse files Browse the repository at this point in the history
  • Loading branch information
0xForerunner committed Feb 2, 2024
1 parent 239d182 commit 9ca581b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ pub enum Branch<H: Hasher> {
}

/// Merkle proof path, bottom to top.
#[derive(Clone, PartialEq, Eq, Serialize)]
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(bound(deserialize = "H::Hash: Deserialize<'de>",))]
pub struct Proof<H: Hasher>(pub Vec<Branch<H>>);

/// For a given node index, return the parent node index
Expand Down

0 comments on commit 9ca581b

Please sign in to comment.