Fix EpochCache handling in ef-tests

This commit is contained in:
Michael Sproul
2023-06-30 22:57:36 +10:00
parent 2df714e2cd
commit f631b515f6
6 changed files with 31 additions and 6 deletions

View File

@@ -28,6 +28,8 @@ pub fn process_epoch<T: EthSpec>(
state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;
state.build_committee_cache(RelativeEpoch::Next, spec)?;
state.build_total_active_balance_cache_at(state.current_epoch(), spec)?;
initialize_epoch_cache(state, state.current_epoch(), spec)?;
// Pre-compute participating indices and total balances.
let mut participation_cache = ParticipationCache::new(state, spec)?;

View File

@@ -24,6 +24,8 @@ pub fn process_epoch<T: EthSpec>(
state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;
state.build_committee_cache(RelativeEpoch::Next, spec)?;
state.build_total_active_balance_cache_at(state.current_epoch(), spec)?;
initialize_epoch_cache(state, state.current_epoch(), spec)?;
// Load the struct we use to assign validators into sets based on their participation.
//

View File

@@ -24,6 +24,8 @@ pub fn process_epoch<T: EthSpec>(
state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;
state.build_committee_cache(RelativeEpoch::Next, spec)?;
state.build_total_active_balance_cache_at(state.current_epoch(), spec)?;
initialize_epoch_cache(state, state.current_epoch(), spec)?;
// Pre-compute participating indices and total balances.
let mut participation_cache = ParticipationCache::new(state, spec)?;