Skip to content

Commit

Permalink
(NOBIDS) fix count queries
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed Sep 5, 2023
1 parent 8ef564c commit e8979e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,7 @@ func GetWithdrawalsCountForQuery(query string) (uint64, error) {
FROM blocks_withdrawals w
INNER JOIN blocks b ON w.block_root = b.blockroot AND b.status = '1'
%s
ORDER BY b.block_slot DESC
ORDER BY w.block_slot DESC
LIMIT %d
) a`

Expand Down Expand Up @@ -2955,9 +2955,11 @@ func GetBLSChangesCountForQuery(query string) (uint64, error) {

blsQuery := `
SELECT COUNT(*) FROM (
SELECT b.slot
FROM blocks_bls_change bls
INNER JOIN blocks b ON bls.block_root = b.blockroot AND b.status = '1'
%s
ORDER BY b.slot DESC
LIMIT %d
) a
`
Expand Down

0 comments on commit e8979e0

Please sign in to comment.