From 217719347dd2ac76e44cff677d00bf63e8edefcd Mon Sep 17 00:00:00 2001 From: cam-schultz <78878559+cam-schultz@users.noreply.github.com> Date: Sun, 17 Sep 2023 09:00:04 -0500 Subject: [PATCH] internal/ethapi: correctly calculate effective gas price (#28130) correctly calculate effective gas price --- internal/ethapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index c37e716de..733e671e0 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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 }