zebra_chain/sprout/note/
arbitrary.rs

1use proptest::{collection::vec, prelude::*};
2
3impl Arbitrary for super::EncryptedNote {
4    type Parameters = ();
5
6    fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy {
7        (vec(any::<u8>(), 601))
8            .prop_map(|v| {
9                let mut bytes = [0; 601];
10                bytes.copy_from_slice(v.as_slice());
11                Self(bytes)
12            })
13            .boxed()
14    }
15
16    type Strategy = BoxedStrategy<Self>;
17}