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(devnet): ignore duplicate epoch reports #46

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

mortimr
Copy link
Contributor

@mortimr mortimr commented Aug 16, 2024

This pull request (PR) introduces a fix for duplicate epoch reports that occur due to events being replayed on the development network (devnet). The changes ensure that if a report with the same epoch is encountered, it will not be processed again, effectively preventing redundancies.

Summary

Code Changes

  1. Enhanced Event Handling: The core modification is in the event handling function handleProcessedReport. A conditional check has been added to ascertain if the report associated with a specific epoch already exists in the database. If it does, the function returns early, bypassing unnecessary processing of duplicate events .

  2. Report Creation Logic: In the event that the report does not exist, a new report is created. The updated logic ensures that only unique epoch reports are considered for storage, which optimizes the handling of report data .

- due to a fix on devnet , a previous report event was replayed with same epoch
@mortimr mortimr merged commit 1ec053a into master Aug 16, 2024
8 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.

2 participants