|
|
|
@ -370,8 +370,8 @@ func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error { |
|
|
|
return cs.sendTCPError(req.Id, errReply) |
|
|
|
return cs.sendTCPError(req.Id, errReply) |
|
|
|
} |
|
|
|
} |
|
|
|
return cs.sendTCPResult(req.Id, &reply) |
|
|
|
return cs.sendTCPResult(req.Id, &reply) |
|
|
|
// Handle requests of type "eth_submitWork"
|
|
|
|
// Handle requests of type "eth_submitWork"
|
|
|
|
case "eth_submitWork": |
|
|
|
case "eth_submitWork": |
|
|
|
// Unmarshal the parameters from the request into a slice of strings
|
|
|
|
// Unmarshal the parameters from the request into a slice of strings
|
|
|
|
var params []string |
|
|
|
var params []string |
|
|
|
err := json.Unmarshal(req.Params, ¶ms) |
|
|
|
err := json.Unmarshal(req.Params, ¶ms) |
|
|
|
@ -468,7 +468,7 @@ func (cs *Session) pushNewJob(s *ProxyServer, result interface{}) error { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
Height: util.ToHex1(int64(a.Height)), |
|
|
|
Height: util.ToHex1(int64(a.Height)), |
|
|
|
Algo: "etchash", |
|
|
|
Algo: s.config.Network, |
|
|
|
} |
|
|
|
} |
|
|
|
return cs.enc.Encode(&resp) |
|
|
|
return cs.enc.Encode(&resp) |
|
|
|
} |
|
|
|
} |
|
|
|
@ -568,7 +568,7 @@ func (cs *Session) sendJob(s *ProxyServer, id json.RawMessage, newjob bool) erro |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
Height: util.ToHex1(int64(t.Height)), |
|
|
|
Height: util.ToHex1(int64(t.Height)), |
|
|
|
Algo: "etchash", |
|
|
|
Algo: s.config.Network, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return cs.sendTCPReq(resp) |
|
|
|
return cs.sendTCPReq(resp) |
|
|
|
|