Skip to content

Commit 1e6a709

Browse files
authored
Merge pull request #2854 from gobitfly/NOBIDS/fix-vali-page
(NOBIDS) fix validator-page for valis that got sync-duties at the sam…
2 parents 33431f4 + a8d52c6 commit 1e6a709

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

handlers/validator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ func Validator(w http.ResponseWriter, r *http.Request) {
731731
if len(actualSyncPeriods) > 0 {
732732
// get sync stats from validator_stats
733733
syncStats := types.SyncCommitteesStats{}
734-
if lastStatsDay > 0 {
734+
// check if validator has been active in the last exported stats day
735+
if lastStatsDay > 0 && validatorPageData.ActivationEpoch <= lastStatsDay*utils.EpochsPerDay() {
735736
err = db.ReaderDb.Get(&syncStats, `
736737
SELECT
737738
COALESCE(participated_sync_total, 0) AS participated_sync,

0 commit comments

Comments
 (0)