@@ -2,6 +2,9 @@ use crate::common::get_attesting_indices;
22use safe_arith:: SafeArith ;
33use types:: * ;
44
5+ #[ cfg( feature = "arbitrary-fuzz" ) ]
6+ use arbitrary:: Arbitrary ;
7+
58/// Sets the boolean `var` on `self` to be true if it is true on `other`. Otherwise leaves `self`
69/// as is.
710macro_rules! set_self_if_other_is_true {
@@ -13,6 +16,7 @@ macro_rules! set_self_if_other_is_true {
1316}
1417
1518/// The information required to reward a block producer for including an attestation in a block.
19+ #[ cfg_attr( feature = "arbitrary-fuzz" , derive( Arbitrary ) ) ]
1620#[ derive( Debug , Clone , Copy ) ]
1721pub struct InclusionInfo {
1822 /// The distance between the attestation slot and the slot that attestation was included in a
@@ -44,6 +48,7 @@ impl InclusionInfo {
4448}
4549
4650/// Information required to reward some validator during the current and previous epoch.
51+ #[ cfg_attr( feature = "arbitrary-fuzz" , derive( Arbitrary ) ) ]
4752#[ derive( Debug , Default , Clone ) ]
4853pub struct ValidatorStatus {
4954 /// True if the validator has been slashed, ever.
@@ -108,7 +113,9 @@ impl ValidatorStatus {
108113
109114/// The total effective balances for different sets of validators during the previous and current
110115/// epochs.
116+
111117#[ derive( Clone , Debug ) ]
118+ #[ cfg_attr( feature = "arbitrary-fuzz" , derive( Arbitrary ) ) ]
112119pub struct TotalBalances {
113120 /// The effective balance increment from the spec.
114121 effective_balance_increment : u64 ,
@@ -165,6 +172,7 @@ impl TotalBalances {
165172
166173/// Summarised information about validator participation in the _previous and _current_ epochs of
167174/// some `BeaconState`.
175+ #[ cfg_attr( feature = "arbitrary-fuzz" , derive( Arbitrary ) ) ]
168176#[ derive( Debug , Clone ) ]
169177pub struct ValidatorStatuses {
170178 /// Information about each individual validator from the state's validator registry.
0 commit comments