internal/ethapi: return maxFeePerGas for gasPrice for EIP-1559 txs (#23345)

pull/23371/head
lightclient 3 years ago committed by GitHub
parent 66948316f7
commit 39fe7eca6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/ethapi/api.go

@ -1323,7 +1323,7 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
price := math.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap()) price := math.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap())
result.GasPrice = (*hexutil.Big)(price) result.GasPrice = (*hexutil.Big)(price)
} else { } else {
result.GasPrice = nil result.GasPrice = (*hexutil.Big)(tx.GasFeeCap())
} }
} }
return result return result

Loading…
Cancel
Save