Skip to content

Commit

Permalink
eth: restore eth_hashrate API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Apr 29, 2021
1 parent 64b60c7 commit 06f44c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 06f44c0

Please sign in to comment.