This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Conversation
Member
Author
|
@gsalgado Can you give this a look? It's technically three things. All small. If you'd prefer I separate them into individual PRs I will. |
gsalgado
reviewed
Sep 27, 2017
evm/validation.py
Outdated
| } | ||
|
|
||
|
|
||
| def validate_header_parames_for_configuration(header_params): |
tests/core/fixtures.py
Outdated
| if chain.should_be_canonical_chain_head(imported_block): | ||
| chain.add_to_canonical_chain_head(imported_block) | ||
|
|
||
| return imported_block |
Contributor
There was a problem hiding this comment.
I'm a bit worried about duplicating the whole import_block() method here as there's nothing to ensure both implementations are identical. It could lead to tests that pass just because we're not exercising the actual production code. That's not an issue when we simply make the validation method a no-op
Member
Author
There was a problem hiding this comment.
Updated to use the kwarg approach we talked about.
Member
Author
|
@gsalgado Addressed your comments. going to merge when green unless I hear otherwise. |
pacrob
added a commit
to pacrob/py-evm
that referenced
this pull request
Dec 18, 2023
* add pre-commit * run pre-commit * skip lint on README.md as it breaks template filling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong?
Chain.ensure_blocks_are_equalseemed to only exist because it needed to be overridden in some tests.Chain.mine_block()function for non-import based blockchain advancement. This is needed in Implement MainnetTesterChain #92configure_homestead_headerfunction delegated to theconfigure_frontier_headerfunction, but only to perform the validation of theheader_params.How was it fixed?
Chain.mine_block()APIheader_paramsvalidation to a stand-alone function and decoupled the two frontier and homestead functions.Cute Animal Picture