Skip to content

Commit

Permalink
Remove spurious Hasher: BorshSerialize + BorshDeserialize bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 committed Jun 27, 2024
1 parent fe03c66 commit dc55460
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types/proof/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub struct SparseMerkleProof<H: SimpleHasher> {
siblings: Vec<SparseMerkleNode>,

/// A marker type showing which hash function is used in this proof.
#[borsh(bound(serialize = "", deserialize = ""))]
phantom_hasher: PhantomData<H>,
}

Expand Down Expand Up @@ -511,7 +512,9 @@ impl<H: SimpleHasher> SparseMerkleProof<H> {
}

#[derive(Debug, Serialize, Deserialize, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct UpdateMerkleProof<H: SimpleHasher>(Vec<SparseMerkleProof<H>>);
pub struct UpdateMerkleProof<H: SimpleHasher>(
#[borsh(bound(serialize = "", deserialize = ""))] Vec<SparseMerkleProof<H>>,
);

impl<H: SimpleHasher> UpdateMerkleProof<H> {
pub fn new(merkle_proofs: Vec<SparseMerkleProof<H>>) -> Self {
Expand Down

0 comments on commit dc55460

Please sign in to comment.