diff --git a/zebra-chain/src/equihash_solution.rs b/zebra-chain/src/equihash_solution.rs index 5a97d5db..af1ef59c 100644 --- a/zebra-chain/src/equihash_solution.rs +++ b/zebra-chain/src/equihash_solution.rs @@ -85,3 +85,20 @@ impl Arbitrary for EquihashSolution { type Strategy = BoxedStrategy; } + +#[cfg(test)] +proptest! { + + #[test] + fn encrypted_ciphertext_roundtrip(solution in any::()) { + + let mut data = Vec::new(); + + solution.zcash_serialize(&mut data).expect("EquihashSolution should serialize"); + + let solution2 = EquihashSolution::zcash_deserialize(&data[..]).expect("randomized EquihashSolution should deserialize"); + + prop_assert_eq![solution, solution2]; + } + +}