Skip to content

Commit

Permalink
fix(dashboard): properly filter data set in blocks query (#1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly authored Nov 5, 2024
1 parent 63fc6e8 commit fcd44d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/pkg/api/data_access/vdb_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (d *DataAccessService) GetValidatorDashboardBlocks(ctx context.Context, das
goqu.I("relays_blocks.exec_block_hash"),
goqu.I("relays_blocks.proposer_fee_recipient"),
goqu.MAX(goqu.I("relays_blocks.value")).As("value")).
Where(goqu.I("relays_blocks.exec_block_hash").Eq(blocks.Col("exec_block_hash"))).
GroupBy(
"exec_block_hash",
"proposer_fee_recipient",
Expand Down Expand Up @@ -310,10 +311,12 @@ func (d *DataAccessService) GetValidatorDashboardBlocks(ctx context.Context, das
Reward decimal.Decimal
}
startTime := time.Now()
query, args, err := blocksDs.Prepared(true).ToSQL()
query, args, err := blocksDs.Prepared(false).ToSQL()
if err != nil {
return nil, nil, err
}

log.Info(query)
err = d.alloyReader.SelectContext(ctx, &proposals, query, args...)
log.Debugf("=== getting past blocks took %s", time.Since(startTime))
if err != nil {
Expand Down

0 comments on commit fcd44d9

Please sign in to comment.