8000 refactor: rename field to next_gas_price by Longarithm · Pull Request #9641 · near/nearcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

Longarithm
Copy link
Member

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.

@Longarithm Longarithm requested a review from pugachAG October 5, 2023 10:41
@Longarithm Longarithm self-assigned this Oct 5, 2023
@Longarithm Longarithm marked this pull request as ready for review October 5, 2023 10:41
@Longarithm Longarithm requested a review from a team as a code owner October 5, 2023 10:41
@@ -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,
Copy link
Contributor

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

@Longarithm Longarithm requested a review from pugachAG October 9, 2023 11:23
Copy link
Contributor
@pugachAG pugachAG left a 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!

@Longarithm Longarithm added this pull request to the merge queue Oct 10, 2023
Merged via the queue into near:master with commit 492d189 Oct 10, 2023
@Longarithm Longarithm deleted the next-gas-price branch October 10, 2023 10:36
nikurt pushed a commit that referenced this pull request Oct 11, 2023
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.
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
0