Skip to content

Commit

Permalink
Fix active indices
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Jun 24, 2021
1 parent cfad885 commit 2c5cfe6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl ParticipationCache {
}

pub fn eligible_validator_indices(&self) -> Result<&[usize], BeaconStateError> {
self.current_epoch_participation
self.previous_epoch_participation
.eligible_indices_opt
.as_deref()
.ok_or(BeaconStateError::EpochOutOfBounds)
Expand Down Expand Up @@ -190,7 +190,7 @@ fn get_epoch_participation<T: EthSpec>(
HashMap::with_capacity(active_validator_indices.len());
let mut total_flag_balances = [0; NUM_FLAG_INDICES];
let mut total_active_balance = 0;
let mut eligible_indices_opt = if epoch == state.current_epoch() {
let mut eligible_indices_opt = if epoch == state.previous_epoch() {
// This Vec might be the wrong size since it'll be filled with the *previous* epoch values,
// no current epoch values.
//
Expand Down

0 comments on commit 2c5cfe6

Please sign in to comment.