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

Block: Directly throw in validation functions #1889

Closed
holgerd77 opened this issue May 17, 2022 · 0 comments · Fixed by #1959
Closed

Block: Directly throw in validation functions #1889

holgerd77 opened this issue May 17, 2022 · 0 comments · Fixed by #1959

Comments

@holgerd77
Copy link
Member

Part of #1717
Builds upon #1879

Another last-round breaking release task:

Directly throw in validation functions like BlockHeader.validateGasLimit(), throw with more appropriate error messages (e.g. EIP-1559 specific), see #1148 (comment).

There are various validation functions (also e.g. validateDifficulty(), validateCliqueDifficulty()) which just operate on a true/false return basis and the question is if we also want to move these to a return-void-or-throw-error scheme like already being done in the broader validate() function.

There should be a really close look in both BlockHeader and Block if all respective validation functions have been "caught". 😋

Will assign @emersonmacro Emmett here, since he has already taken on a Block-validation-methods refactoring task and I guess this would be a good fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants