diff --git a/proxy/stratum.go b/proxy/stratum.go index 53139c9..bf2013c 100644 --- a/proxy/stratum.go +++ b/proxy/stratum.go @@ -5,6 +5,7 @@ import ( "crypto/tls" "encoding/json" "errors" + "fmt" "io" "log" "math/rand" @@ -245,7 +246,7 @@ func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error { _, errReply := s.handleLoginRPC(cs, params, req.Worker) if errReply != nil { return cs.sendStratumError(req.Id, []string{ - string(errReply.Code), + fmt.Sprint(errReply.Code), errReply.Message, }) } @@ -331,7 +332,7 @@ func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error { reply, errReply := s.handleLoginRPC(cs, params, req.Worker) if errReply != nil { return cs.sendStratumError(req.Id, []string{ - string(errReply.Code), + fmt.Sprint(errReply.Code), errReply.Message, }) } @@ -646,7 +647,7 @@ func (cs *Session) sendJob(s *ProxyServer, id json.RawMessage, newjob bool) erro reply, errReply := s.handleGetWorkRPC(cs) if errReply != nil { return cs.sendStratumError(id, []string{ - string(errReply.Code), + fmt.Sprint(errReply.Code), errReply.Message, }) }