Browse Source

// claymore -esm 1

master
yuriy0803 2 years ago
parent
commit
4a471de662
  1. 16
      proxy/stratum.go

16
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, &params)
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, &params); err != nil || len(params) < 1 {

Loading…
Cancel
Save