-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix effective gas price for rpc getTransactionReceipt #4844
base: dev
Are you sure you want to change the base?
Conversation
@@ -390,6 +417,11 @@ func NewStakingTxReceipt( | |||
return nil, err | |||
} | |||
|
|||
effectiveGasPrice := *big.NewInt(0) | |||
if receipt.EffectiveGasPrice != nil { |
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.
We should add an else
clause to prevent the RPC to returns an effective gas price of 0. Not sure what edge case we are going to have in this case.
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.
Hey @Frozen I've tested against old and new transactions against testnet RPC and found that rn we still have 2 behaviors:
- old transactions have "effectiveGasPrice": 0
- new transactions have effectiveGasPrice==gasUsed
Can we make the same behavior effectiveGasPrice==gasUsed
for the old transactions?
460c1a6
to
6f126d8
Compare
returns |
Fixed issue with effective gas price panic. Covered wth tests.