rpc: fix gas price value returns constant 0 (#141)

This commit is contained in:
Thomas Nguy 2021-06-21 17:03:54 +09:00 committed by GitHub
parent a3ee8a4622
commit d8926636e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,8 @@ func (e *PublicEthAPI) Hashrate() hexutil.Uint64 {
// GasPrice returns the current gas price based on Ethermint's gas price oracle.
func (e *PublicEthAPI) GasPrice() *hexutil.Big {
e.logger.Debugln("eth_gasPrice")
out := big.NewInt(0)
// TODO: use minimum value defined in config instead of default or implement oracle
out := big.NewInt(ethermint.DefaultGasPrice)
return (*hexutil.Big)(out)
}