correctly calculate effective gas price

This commit is contained in:
Cameron Schultz 2023-09-15 11:25:01 -05:00
parent 16cd1a7561
commit b0daa52e0b
No known key found for this signature in database
GPG key ID: 108D47DD3A7D649C

View file

@ -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
}