mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: add missing eth_getHashrate() method
Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
parent
0734c4b820
commit
50408fde71
1 changed files with 5 additions and 0 deletions
|
|
@ -66,6 +66,11 @@ func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 {
|
||||||
return hexutil.Uint64(api.e.Miner().HashRate())
|
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.
|
// ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.
|
||||||
func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 {
|
func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 {
|
||||||
chainID := new(big.Int)
|
chainID := new(big.Int)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue