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

Small Fixes #21

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Small Fixes #21

merged 2 commits into from
Nov 14, 2023

Conversation

mooselumph
Copy link
Contributor

Why are these changes needed?

  • Add check to graph chainstate to avoid panic;
  • Add tests to shared storage;
  • Add delay to referenceBlockNumber used by encodingStreamer to allow time for indexing.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@@ -191,6 +193,12 @@ func (e *EncodingStreamer) RequestEncoding(ctx context.Context, encoderChan chan
if referenceBlockNumber == 0 {
// Update the reference block number for the next iteration
blockNumber, err := e.chainState.GetCurrentBlockNumber()
// Backup the reference block number to give indexer time to index the current block. This is important because
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to have this comment, much easier to understand why this change

@mooselumph mooselumph merged commit 54a9807 into Layr-Labs:master Nov 14, 2023
4 checks passed
teddyknox pushed a commit that referenced this pull request Nov 16, 2023
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