Browse Source

Algo: s.config.Network, info

Algo:   s.config.Network, info
master
yuriy0803 3 years ago
parent
commit
d1238dac9b
  1. 8
      proxy/stratum.go

8
proxy/stratum.go

@ -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, &params) err := json.Unmarshal(req.Params, &params)
@ -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)

Loading…
Cancel
Save