diff --git a/backend/pkg/api/data_access/vdb_summary.go b/backend/pkg/api/data_access/vdb_summary.go index a8165344a..3371d565c 100644 --- a/backend/pkg/api/data_access/vdb_summary.go +++ b/backend/pkg/api/data_access/vdb_summary.go @@ -557,14 +557,16 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex ) } + slots := utils.Config.Chain.ClConfig.SlotsPerEpoch / 2 + // Define the `res` CTE res := goqu. From("targets"). LeftJoin( goqu.T("execution_rewards_finalized").As("b"), goqu.On( - goqu.I("b.slot").Gte(goqu.L("targets.slot - 16")), - goqu.I("b.slot").Lt(goqu.L("targets.slot + 16")), + goqu.I("b.slot").Gte(goqu.L("targets.slot - ?", slots)), + goqu.I("b.slot").Lt(goqu.L("targets.slot + ?", slots)), ), ). Select(