add as_iter to all List and Vector fields in the beacon state

This commit is contained in:
realbigsean
2024-05-13 02:37:51 -04:00
parent 9c33a6ff9e
commit 75f6f7810a
2 changed files with 9 additions and 0 deletions

View File

@@ -371,6 +371,7 @@ where
pub eth1_deposit_index: u64,
// Registry
#[compare_fields(as_iter)]
#[test_random(default)]
pub validators: List<Validator, E::ValidatorRegistryLimit>,
#[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
@@ -396,8 +397,10 @@ where
pub current_epoch_attestations: List<PendingAttestation<E>, E::MaxPendingAttestations>,
// Participation (Altair and later)
#[compare_fields(as_iter)]
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
#[test_random(default)]
#[compare_fields(as_iter)]
pub previous_epoch_participation: List<ParticipationFlags, E::ValidatorRegistryLimit>,
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
#[test_random(default)]
@@ -494,13 +497,16 @@ where
#[superstruct(only(Electra), partial_getter(copy))]
#[metastruct(exclude_from(tree_lists))]
pub earliest_consolidation_epoch: Epoch,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_balance_deposits: List<PendingBalanceDeposit, E::PendingBalanceDepositsLimit>,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_partial_withdrawals:
List<PendingPartialWithdrawal, E::PendingPartialWithdrawalsLimit>,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_consolidations: List<PendingConsolidation, E::PendingConsolidationsLimit>,