Skip to content

Commit

Permalink
Merge pull request #2854 from gobitfly/NOBIDS/fix-vali-page
Browse files Browse the repository at this point in the history
(NOBIDS) fix validator-page for valis that got sync-duties at the sam…
  • Loading branch information
recy21 authored Mar 26, 2024
2 parents 33431f4 + a8d52c6 commit 1e6a709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion handlers/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,8 @@ func Validator(w http.ResponseWriter, r *http.Request) {
if len(actualSyncPeriods) > 0 {
// get sync stats from validator_stats
syncStats := types.SyncCommitteesStats{}
if lastStatsDay > 0 {
// check if validator has been active in the last exported stats day
if lastStatsDay > 0 && validatorPageData.ActivationEpoch <= lastStatsDay*utils.EpochsPerDay() {
err = db.ReaderDb.Get(&syncStats, `
SELECT
COALESCE(participated_sync_total, 0) AS participated_sync,
Expand Down

0 comments on commit 1e6a709

Please sign in to comment.