test: add coverage for get_block_env blob gas#488
Open
vikions wants to merge 2 commits intorisechain:mainfrom
Open
test: add coverage for get_block_env blob gas#488vikions wants to merge 2 commits intorisechain:mainfrom
vikions wants to merge 2 commits intorisechain:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces unit tests for the get_block_env function in crates/pevm/src/compat.rs, ensuring correct field mapping and spec-dependent blob gas price calculations for Cancun and Prague. The review feedback suggests using unwrap_or_default() for the base fee in tests to align with the implementation's fallback behavior and refactoring multiple unwraps of excess_blob_gas into a single variable to improve readability.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add direct unit tests for
compat::get_block_env, especially theblob_excess_gas_and_pricebranch mentioned in the TODO.The new tests verify:
Nonebehavior whenexcess_blob_gasis missingThis is a narrow test-only change with no behavior changes.