Open
Description
Example
#[derive(Debug, Serialize, Deserialize, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct UpdateMerkleProof<H: SimpleHasher>(Vec<SparseMerkleProof<H>>);
BorshSerialize is implemented for Vec<SparseMerkleProof<H>>
for all H
. Yes, it is possible to do a #[borsh(bound(deserialize = "", serialize = ""))]
trick in this particular case, but for enums its not obvious.
Possible solution
#[borsh(relax = "T")
enum/struct A<T> {
...
Linked issue: penumbra-zone/jmt#113
Metadata
Assignees
Labels
No labels