Skip to content
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

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

LuccaBitfly
Copy link
Collaborator

@LuccaBitfly LuccaBitfly commented Nov 6, 2023

🤖 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 and handlers/api.go, and removes unused modules from go.mod.

@LuccaBitfly LuccaBitfly force-pushed the BIDS-2629/optimizeWithdrawalQueries branch from 5e45e9b to 747deb5 Compare November 6, 2023 08:55
@LuccaBitfly LuccaBitfly marked this pull request as ready for review November 6, 2023 09:29
Copy link
Collaborator

@Eisei24 Eisei24 left a 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)
Copy link
Collaborator

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)
Copy link
Collaborator

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 (
Copy link
Collaborator

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.

@LuccaBitfly LuccaBitfly merged commit a0f539c into master Nov 7, 2023
3 checks passed
@LuccaBitfly LuccaBitfly deleted the BIDS-2629/optimizeWithdrawalQueries branch November 7, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants