-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(BIDS-2629) optimize withdrawal queries #2668
Conversation
5e45e9b
to
747deb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, some obsolete ;
can be deleted.
db/db.go
Outdated
SELECT | ||
today.sum + stats.sum as sum, | ||
today.count + stats.count as count | ||
FROM today, stats;`, cutoffSlot, lastExportedDay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Obsolete ;
.
db/db.go
Outdated
SELECT today.count_today + stats.total_count | ||
FROM today, stats;`, validatorFilter, cutoffSlot) | ||
SELECT today.count + stats.count | ||
FROM today, stats;`, validatorFilter, cutoffSlot, lastExportedDay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Obsolete ;
.
@@ -1585,7 +1585,7 @@ func apiValidator(w http.ResponseWriter, r *http.Request) { | |||
WITH today AS ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Obsolete ;
at the end of this query.
🤖 Generated by Copilot at 747deb5
This pull request improves the performance and accuracy of the withdrawal and validator data queries, and cleans up some dependencies and naming issues. It updates the functions in
db/db.go
andhandlers/api.go
, and removes unused modules fromgo.mod
.