all: fix miner hashRate -> hashrate on API calls

This commit is contained in:
Péter Szilágyi
2021-03-31 10:56:51 +03:00
parent 4a37ae510e
commit 55300d4fdb
6 changed files with 8 additions and 18 deletions

View File

@ -61,11 +61,6 @@ func (api *PublicEthereumAPI) Coinbase() (common.Address, error) {
return api.Etherbase()
}
// Hashrate returns the POW hashrate
func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 {
return hexutil.Uint64(api.e.Miner().HashRate())
}
// ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.
func (api *PublicEthereumAPI) ChainId() (hexutil.Uint64, error) {
// if current block is at or past the EIP-155 replay-protection fork block, return chainID from config
@ -149,11 +144,6 @@ func (api *PrivateMinerAPI) SetRecommitInterval(interval int) {
api.e.Miner().SetRecommitInterval(time.Duration(interval) * time.Millisecond)
}
// GetHashrate returns the current hashrate of the miner.
func (api *PrivateMinerAPI) GetHashrate() uint64 {
return api.e.miner.HashRate()
}
// PrivateAdminAPI is the collection of Ethereum full node-related APIs
// exposed over the private admin endpoint.
type PrivateAdminAPI struct {