diff --git a/proxy/stratum.go b/proxy/stratum.go index d412867..5e81513 100644 --- a/proxy/stratum.go +++ b/proxy/stratum.go @@ -176,6 +176,22 @@ func (cs *Session) stratumMode() int { func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error { // Handle RPC/Stratum methods switch req.Method { + // claymore -esm 1 + case "eth_login": + // Unmarshal request parameters + var params []string + err := json.Unmarshal(req.Params, ¶ms) + if err != nil { + log.Println("Malformed stratum request params from", cs.ip) + return err + } + // Process "eth_login" method and return response + reply, errReply := s.handleLoginRPC(cs, params, req.Worker) + if errReply != nil { + return cs.sendTCPError(req.Id, errReply) + } + return cs.sendTCPResult(req.Id, reply) + // claymore -esm 0 case "eth_submitLogin": var params []string if err := json.Unmarshal(req.Params, ¶ms); err != nil || len(params) < 1 {