Skip to content

Commit 2177193

Browse files
authored
internal/ethapi: correctly calculate effective gas price (#28130)
correctly calculate effective gas price
1 parent 9a9db3d commit 2177193

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/ethapi/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,8 +1520,8 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
15201520
func effectiveGasPrice(tx *types.Transaction, baseFee *big.Int) *big.Int {
15211521
fee := tx.GasTipCap()
15221522
fee = fee.Add(fee, baseFee)
1523-
if tx.GasTipCapIntCmp(fee) < 0 {
1524-
return tx.GasTipCap()
1523+
if tx.GasFeeCapIntCmp(fee) < 0 {
1524+
return tx.GasFeeCap()
15251525
}
15261526
return fee
15271527
}

0 commit comments

Comments
 (0)