mirror of https://github.com/status-im/op-geth.git
Merge pull request #1675 from obscuren/submithashrate-change
rpc/api: return boolean value for eth_submitHashrate
This commit is contained in:
commit
e1da124415
|
@ -577,10 +577,10 @@ func (self *ethApi) SubmitWork(req *shared.Request) (interface{}, error) {
|
||||||
func (self *ethApi) SubmitHashrate(req *shared.Request) (interface{}, error) {
|
func (self *ethApi) SubmitHashrate(req *shared.Request) (interface{}, error) {
|
||||||
args := new(SubmitHashRateArgs)
|
args := new(SubmitHashRateArgs)
|
||||||
if err := self.codec.Decode(req.Params, &args); err != nil {
|
if err := self.codec.Decode(req.Params, &args); err != nil {
|
||||||
return nil, shared.NewDecodeParamError(err.Error())
|
return false, shared.NewDecodeParamError(err.Error())
|
||||||
}
|
}
|
||||||
self.xeth.RemoteMining().SubmitHashrate(common.HexToHash(args.Id), args.Rate)
|
self.xeth.RemoteMining().SubmitHashrate(common.HexToHash(args.Id), args.Rate)
|
||||||
return nil, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *ethApi) Resend(req *shared.Request) (interface{}, error) {
|
func (self *ethApi) Resend(req *shared.Request) (interface{}, error) {
|
||||||
|
|
Loading…
Reference in New Issue