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

internal/ethapi: fix null effectiveGasPrice in GetTransactionReceipt #1980

Conversation

buddh0
Copy link
Collaborator

@buddh0 buddh0 commented Nov 10, 2023

Description

internal/ethapi: fix null effectiveGasPrice in GetTransactionReceipt

Rationale

cached receipt miss the field effectiveGasPrice, fix it

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@@ -2082,6 +2091,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
if err != nil {
return it.index, err
}

bc.cacheReceipts(block.Hash(), receipts, block)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this line's positioning was changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to store the field EffectiveGasPrice to disk
because it can be derived from transaction info, please refer to func ReadReceipts-->func DeriveFields
so we move the cache action after func WriteReceipts

@brilliant-lx brilliant-lx merged commit 4be9481 into bnb-chain:develop Nov 14, 2023
5 checks passed
@buddh0 buddh0 deleted the null_effectiveGasPrice_when_GetTransactionReceipt branch December 12, 2023 02:21
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.

None yet

5 participants