Skip to content

Commit

Permalink
(BIDS-2261) fix unable to retrieve all sync committee count statistic…
Browse files Browse the repository at this point in the history
…s error
  • Loading branch information
peterbitfly committed Sep 25, 2023
1 parent f2150be commit 59bb69a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions handlers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,11 @@ func getExpectedSyncCommitteeSlots(validators []uint64, epoch uint64) (expectedS
return 0, nil
}

lastFinalizedEpoch := services.LatestFinalizedEpoch()
if epoch > lastFinalizedEpoch {
epoch = lastFinalizedEpoch
}

// retrieve activation and exit epochs from database per validator
type ValidatorInfo struct {
Id int64 `db:"validatorindex"`
Expand Down

0 comments on commit 59bb69a

Please sign in to comment.