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

Adding handling for null block in getBlocksForRange #61

Merged
merged 5 commits into from
May 4, 2022
Merged

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Apr 29, 2022

MetaMask/metamask-extension#10550

PR fixes issue that getBlocksForRange can return null block. The approach takes for the fix is as details here:

  1. is a block is not found retry 3 times
  2. if block is not found even after 3rd retry propagate error

@jpuri jpuri marked this pull request as ready for review May 3, 2022 16:21
@jpuri jpuri requested a review from a team as a code owner May 3, 2022 16:21
@jpuri jpuri requested review from Gudahtt, kumavis and mcmire May 3, 2022 16:21
kumavis
kumavis previously approved these changes May 3, 2022
mcmire
mcmire previously approved these changes May 3, 2022
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

One little thing, but looks good regardless.

);
}
}
throw new Error(`Block not found for params: ${params}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] The params in the error message seem like they get oversimplified. What about JSON.stringify(params)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point @mcmire

@jpuri jpuri dismissed stale reviews from mcmire and kumavis via 8b6722d May 4, 2022 11:57
@jpuri jpuri requested review from mcmire and kumavis May 4, 2022 11:58
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Looks good!

@jpuri jpuri merged commit 42e0209 into main May 4, 2022
@jpuri jpuri deleted the issue_10550 branch May 4, 2022 14:33
@mcmire mcmire mentioned this pull request May 10, 2022
@kumavis
Copy link
Member

kumavis commented Jan 19, 2023

i think the actual fix is here #83

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