mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Fix EpochCache handling in ef-tests
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::epoch_cache::initialize_epoch_cache;
|
||||
use state_processing::per_epoch_processing::capella::process_historical_summaries_update;
|
||||
use state_processing::per_epoch_processing::{
|
||||
altair, base,
|
||||
@@ -135,6 +136,7 @@ impl<E: EthSpec> EpochTransition<E> for RewardsAndPenalties {
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for RegistryUpdates {
|
||||
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
initialize_epoch_cache(state, state.current_epoch(), spec)?;
|
||||
process_registry_updates(state, spec)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ use crate::case_result::{check_state_diff, compare_beacon_state_results_without_
|
||||
use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yaml_decode_file};
|
||||
use crate::testing_spec;
|
||||
use serde_derive::Deserialize;
|
||||
use state_processing::epoch_cache::initialize_epoch_cache;
|
||||
use state_processing::{
|
||||
per_block_processing::{
|
||||
errors::BlockProcessingError,
|
||||
@@ -86,6 +87,7 @@ impl<E: EthSpec> Operation<E> for Attestation<E> {
|
||||
spec: &ChainSpec,
|
||||
_: &Operations<E, Self>,
|
||||
) -> Result<(), BlockProcessingError> {
|
||||
initialize_epoch_cache(state, state.current_epoch(), spec)?;
|
||||
let mut ctxt = ConsensusContext::new(state.slot());
|
||||
match state {
|
||||
BeaconState::Base(_) => base::process_attestations(
|
||||
|
||||
Reference in New Issue
Block a user