mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-18 17:10:43 +00:00
eth: restore eth_hashrate API endpoint
This commit is contained in:
parent
64b60c7995
commit
06f44c0fd4
1 changed files with 5 additions and 0 deletions
|
|
@ -61,6 +61,11 @@ 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())
|
||||
}
|
||||
|
||||
// PublicMinerAPI provides an API to control the miner.
|
||||
// It offers only methods that operate on data that pose no security risk when it is publicly accessible.
|
||||
type PublicMinerAPI struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue