From 76900e48c99e263c0e751d48502506ae3f770dfe Mon Sep 17 00:00:00 2001 From: Sasha Zezulinsky <188990923+sasha-bitfly@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:21:14 +0000 Subject: [PATCH] minor fixes --- backend/pkg/api/data_access/vdb_summary.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(