mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
added eth_hashrate
This commit is contained in:
parent
8812b3e4c3
commit
969adf0c06
1 changed files with 5 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ var (
|
|||
"eth_getFilterChanges": (*eth).GetFilterChanges,
|
||||
"eth_getFilterLogs": (*eth).GetFilterLogs,
|
||||
"eth_getLogs": (*eth).GetLogs,
|
||||
"eth_hashrate": (*eth).Hashrate,
|
||||
"eth_getWork": (*eth).GetWork,
|
||||
"eth_submitWork": (*eth).SubmitWork,
|
||||
}
|
||||
|
|
@ -110,6 +111,10 @@ func (self *eth) Accounts(req *shared.Request) (interface{}, error) {
|
|||
return self.xeth.Accounts(), nil
|
||||
}
|
||||
|
||||
func (self *eth) Hashrate(req *shared.Request) (interface{}, error) {
|
||||
return newHexNum(self.xeth.HashRate()), nil
|
||||
}
|
||||
|
||||
func (self *eth) BlockNumber(req *shared.Request) (interface{}, error) {
|
||||
return self.xeth.CurrentBlock().Number(), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue