-
Notifications
You must be signed in to change notification settings - Fork 701
refactor: rename field to next_gas_price #9641
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
Conversation
core/primitives/src/block_header.rs
Outdated
@@ -1044,13 +1044,13 @@ impl BlockHeader { | |||
} | |||
|
|||
#[inline] | |||
pub fn gas_price(&self) -> Balance { | |||
pub fn next_gas_price(&self) -> Balance { | |||
match self { | |||
BlockHeader::BlockHeaderV1(header) => header.inner_rest.gas_price, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it consistent and rename it for all BlockHeader versions. That is also what I've done when adding prev_
prefix: #9500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for taking care of this!
Specify that gas price stored in block header is the price for chunks in the **next block**. It should improve readability of block production and verification, and emphasize that for post-state-root gas price computation is not impacted. ## Testing Not required.
Specify that gas price stored in block header is the price for chunks in the next block. It should improve readability of block production and verification, and emphasize that for post-state-root gas price computation is not impacted.
Testing
Not required.