Skip to content

Commit

Permalink
fix warn: conversion from int to string yields a string of one rune, …
Browse files Browse the repository at this point in the history
…not a string of digits
  • Loading branch information
iquidus committed May 17, 2021
1 parent 4c55e47 commit 2734a0a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions proxy/stratum.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"io"
"log"
"math/rand"
Expand Down Expand Up @@ -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,
})
}
Expand Down Expand Up @@ -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,
})
}
Expand Down Expand Up @@ -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,
})
}
Expand Down

0 comments on commit 2734a0a

Please sign in to comment.