mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
merge upstream, fix compile errors
This commit is contained in:
@@ -5,6 +5,7 @@ use crate::decode::{ssz_decode_state, yaml_decode_file};
|
||||
use crate::type_name;
|
||||
use crate::type_name::TypeName;
|
||||
use serde_derive::Deserialize;
|
||||
use state_processing::per_epoch_processing::capella::process_historical_summaries_update;
|
||||
use state_processing::per_epoch_processing::{
|
||||
altair, base,
|
||||
effective_balance_updates::process_effective_balance_updates,
|
||||
@@ -57,6 +58,8 @@ pub struct RandaoMixesReset;
|
||||
#[derive(Debug)]
|
||||
pub struct HistoricalRootsUpdate;
|
||||
#[derive(Debug)]
|
||||
pub struct HistoricalSummariesUpdate;
|
||||
#[derive(Debug)]
|
||||
pub struct ParticipationRecordUpdates;
|
||||
#[derive(Debug)]
|
||||
pub struct SyncCommitteeUpdates;
|
||||
@@ -77,6 +80,7 @@ type_name!(EffectiveBalanceUpdates, "effective_balance_updates");
|
||||
type_name!(SlashingsReset, "slashings_reset");
|
||||
type_name!(RandaoMixesReset, "randao_mixes_reset");
|
||||
type_name!(HistoricalRootsUpdate, "historical_roots_update");
|
||||
type_name!(HistoricalSummariesUpdate, "historical_summaries_update");
|
||||
type_name!(ParticipationRecordUpdates, "participation_record_updates");
|
||||
type_name!(SyncCommitteeUpdates, "sync_committee_updates");
|
||||
type_name!(InactivityUpdates, "inactivity_updates");
|
||||
@@ -194,7 +198,23 @@ impl<E: EthSpec> EpochTransition<E> for RandaoMixesReset {
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for HistoricalRootsUpdate {
|
||||
fn run(state: &mut BeaconState<E>, _spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
process_historical_roots_update(state)
|
||||
match state {
|
||||
BeaconState::Base(_) | BeaconState::Altair(_) | BeaconState::Merge(_) => {
|
||||
process_historical_roots_update(state)
|
||||
}
|
||||
_ => Ok(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for HistoricalSummariesUpdate {
|
||||
fn run(state: &mut BeaconState<E>, _spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
match state {
|
||||
BeaconState::Capella(_) | BeaconState::Eip4844(_) => {
|
||||
process_historical_summaries_update(state)
|
||||
}
|
||||
_ => Ok(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,10 +307,16 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
|
||||
T::name() != "sync_committee_updates"
|
||||
&& T::name() != "inactivity_updates"
|
||||
&& T::name() != "participation_flag_updates"
|
||||
&& T::name() != "historical_summaries_update"
|
||||
}
|
||||
// No phase0 tests for Altair and later.
|
||||
ForkName::Altair | ForkName::Merge | ForkName::Capella | ForkName::Eip4844 => {
|
||||
ForkName::Altair | ForkName::Merge => {
|
||||
T::name() != "participation_record_updates"
|
||||
&& T::name() != "historical_summaries_update"
|
||||
}
|
||||
ForkName::Capella | ForkName::Eip4844 => {
|
||||
T::name() != "participation_record_updates"
|
||||
&& T::name() != "historical_roots_update"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user