We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e75366 commit bcc02b8Copy full SHA for bcc02b8
zebra-chain/src/orchard/arbitrary.rs
@@ -126,7 +126,15 @@ impl Arbitrary for Flags {
126
type Parameters = ();
127
128
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy {
129
- (any::<u8>()).prop_map(Self::from_bits_truncate).boxed()
+ (any::<u8>())
130
+ .prop_map(|byte| {
131
+ // Clear ENABLE_ZSA: it is only valid in V6, but this strategy
132
+ // is also used for V5 transactions where it causes a deserialization error.
133
+ #[cfg(feature = "tx_v6")]
134
+ let byte = byte & !(Flags::ENABLE_ZSA.bits());
135
+ Self::from_bits_truncate(byte)
136
+ })
137
+ .boxed()
138
}
139
140
type Strategy = BoxedStrategy<Self>;
0 commit comments