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

fix: remove the logic for deleting removed events #71

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

amateima
Copy link
Contributor

This query was meant to delete events that were removed due to a re-org, but the query is wrong and it deletes more data than it should

Copy link
Contributor

@melisaguevara melisaguevara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just OOC, do you know why it was deleting more data than expected?

@amateima
Copy link
Contributor Author

amateima commented Oct 15, 2024

Just OOC, do you know why it was deleting more data than expected?

Because deleting by block number only is a mistake. You also need to filter by other parameters, such as chainId because each chain has its own last finalised block (think about deposit events for example) and this was missing from my query. Each table will have its own logic to filter out and delete removed events

@amateima amateima merged commit 5732d63 into master Oct 15, 2024
3 checks passed
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.

3 participants