Skip to content

Commit 8a73d4b

Browse files
committed
fix(api): don't filter skimmings post pectra
1 parent 526272b commit 8a73d4b

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

backend/pkg/api/data_access/vdb_withdrawals.go

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -373,26 +373,21 @@ func (d *DataAccessService) GetValidatorDashboardClWithdrawals(ctx context.Conte
373373
}
374374

375375
// there is a pre- and a post-pectra table in db; only query from respective tables if possible to increase compatibility and simplicity
376-
hasPrePectraRows, hasPostPectraRows := true, false
376+
hasPostPectraRows := false
377377
if d.config.ClConfig.ElectraForkEpoch < utils.MaxForkEpoch {
378378
hasPostPectraRows = true
379379
if currentCursor.IsValid() && colSort.Column == enums.VDBWithdrawalsClColumns.Slot {
380380
postElectra := currentCursor.Slot/d.config.ClConfig.SlotsPerEpoch > d.config.ClConfig.ElectraForkEpoch
381381
lookBack := colSort.Desc != currentCursor.Reverse
382-
if postElectra && !lookBack {
383-
hasPrePectraRows, hasPostPectraRows = false, true
384-
} else if !postElectra && lookBack {
385-
hasPrePectraRows, hasPostPectraRows = true, false
382+
if !postElectra && lookBack {
383+
hasPostPectraRows = false
386384
}
387385
}
388386
}
389387

390-
var withdrawalsDs *goqu.SelectDataset
391-
if hasPrePectraRows {
392-
withdrawalsDs, err = getWithdrawalsBridgeDs(dashboardId, search, isValidSearchWithdrawalAddress, isValidSearchIndexOrSlot, isValidSearchGroup, isValidSearchPublicKey)
393-
if err != nil {
394-
return nil, nil, err
395-
}
388+
withdrawalsDs, err := getWithdrawalsBridgeDs(dashboardId, search, isValidSearchWithdrawalAddress, isValidSearchIndexOrSlot, isValidSearchGroup, isValidSearchPublicKey)
389+
if err != nil {
390+
return nil, nil, err
396391
}
397392
if hasPostPectraRows {
398393
requestsDs, err := getWithdrawalRequestsDs(dashboardId, search, isValidSearchWithdrawalAddress, isValidSearchIndexOrSlot, isValidSearchGroup, isValidSearchPublicKey)

0 commit comments

Comments
 (0)