mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
internal/ethapi: correctly calculate effective gas price (#28130)
correctly calculate effective gas price
This commit is contained in:
parent
9a9db3d265
commit
217719347d
1 changed files with 2 additions and 2 deletions
|
|
@ -1520,8 +1520,8 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
|||
func effectiveGasPrice(tx *types.Transaction, baseFee *big.Int) *big.Int {
|
||||
fee := tx.GasTipCap()
|
||||
fee = fee.Add(fee, baseFee)
|
||||
if tx.GasTipCapIntCmp(fee) < 0 {
|
||||
return tx.GasTipCap()
|
||||
if tx.GasFeeCapIntCmp(fee) < 0 {
|
||||
return tx.GasFeeCap()
|
||||
}
|
||||
return fee
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue