mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 22:04:44 +00:00
add as_iter to all List and Vector fields in the beacon state
This commit is contained in:
@@ -476,7 +476,10 @@ pub fn apply_deposit<E: EthSpec>(
|
||||
// The signature should be checked for new validators. Return early for a bad
|
||||
// signature.
|
||||
if is_valid_deposit_signature(&deposit_data, spec).is_err() {
|
||||
dbg!("invalid sig");
|
||||
return Ok(());
|
||||
} else {
|
||||
dbg!("valid sig");
|
||||
}
|
||||
|
||||
let new_validator_index = state.validators().len();
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user