From 3f1c33bc98e7d67926bb74e96aa312ec3af6aee6 Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Tue, 23 Feb 2021 19:20:49 +0100 Subject: [PATCH] Supported qtminer --- proxy/stratum.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/proxy/stratum.go b/proxy/stratum.go index 31daef2..1c7f1c4 100644 --- a/proxy/stratum.go +++ b/proxy/stratum.go @@ -103,6 +103,20 @@ func (s *ProxyServer) handleTCPClient(cs *Session) error { func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error { // Handle RPC methods switch req.Method { + // claymore -esm 1 + case "eth_login": + var params []string + err := json.Unmarshal(req.Params, ¶ms) + if err != nil { + log.Println("Malformed stratum request params from", cs.ip) + return err + } + 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 err := json.Unmarshal(req.Params, ¶ms)