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

common: refactor epoch sync check when resolving current epoch block #604

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

tilacog
Copy link
Contributor

@tilacog tilacog commented Feb 11, 2023

Enforces that the Epoch Subgraph is at least one epoch away from the Epoch Manager.

Also, checks for the catastrophic case when the former is ahead of the latter.

@tilacog tilacog requested a review from fordN February 11, 2023 00:28
@tilacog tilacog force-pushed the tiago/refactor-valid-epoch-block branch 2 times, most recently from 1e78e66 to e7ed47e Compare February 11, 2023 00:37
@tilacog
Copy link
Contributor Author

tilacog commented Feb 11, 2023

I ended up with an if-else chain because my original idea proved to be hard to control and maintain with a switch statement.

I didn't force-pushed to keep means of comparison, but I pretend to squash the merge commit once approved.

@tilacog tilacog requested a review from fordN February 11, 2023 10:07
Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

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

Code looks good! I made some suggestions for the logging.

packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
packages/indexer-common/src/indexer-management/monitor.ts Outdated Show resolved Hide resolved
@tilacog tilacog requested a review from fordN February 13, 2023 23:01
Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

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

👍

@tilacog tilacog force-pushed the tiago/refactor-valid-epoch-block branch from 299e359 to 06a6e15 Compare February 14, 2023 18:14
@tilacog
Copy link
Contributor Author

tilacog commented Feb 14, 2023

Force pushed to squash irrelevant commits

@tilacog tilacog merged commit c5a1aaa into main Feb 14, 2023
@tilacog tilacog deleted the tiago/refactor-valid-epoch-block branch February 14, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚗 Merged
Development

Successfully merging this pull request may close these issues.

2 participants