eth: add missing eth_getHashrate() method

Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
meows 2020-03-23 11:13:13 -05:00
parent 0734c4b820
commit 50408fde71
No known key found for this signature in database
GPG key ID: 5786AEA5C8D5A520

View file

@ -66,6 +66,11 @@ func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 {
return hexutil.Uint64(api.e.Miner().HashRate())
}
// GetHashrate returns the POW hashrate
func (api *PublicEthereumAPI) GetHashrate() hexutil.Uint64 {
return api.Hashrate()
}
// ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.
func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 {
chainID := new(big.Int)