use GasFeeCap for unmined tx GasPrice

This commit is contained in:
i-norden 2023-06-14 11:49:57 -05:00
parent 68d6695df8
commit a1fbc1875b

View File

@ -202,7 +202,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