Skip to content

Commit

Permalink
config "algo"
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy0803 committed Mar 27, 2024
1 parent 457d392 commit a828cee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions api.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"pplns": 9000,
"network": "classic",
"coin-name": "ETC",
"algo": "etchash",
"proxy": {
"enabled": true,
"listen": "0.0.0.0:8888",
Expand Down
1 change: 1 addition & 0 deletions proxy/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type JSONStratumReq struct {
Method string `json:"method"`
Params interface{} `json:"params"`
Height string `json:"height"`
Algo string `json:"algo"`
}

type StratumReq struct {
Expand Down
2 changes: 2 additions & 0 deletions proxy/stratum.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ func (cs *Session) pushNewJob(s *ProxyServer, result interface{}) error {
},

Height: util.ToHex1(int64(a.Height)),
Algo: s.config.Algo,
}
return cs.enc.Encode(&resp)
}
Expand Down Expand Up @@ -536,6 +537,7 @@ func (cs *Session) sendJob(s *ProxyServer, id json.RawMessage, newjob bool) erro
},

Height: util.ToHex1(int64(t.Height)),
Algo: s.config.Algo,
}

return cs.sendTCPReq(resp)
Expand Down

0 comments on commit a828cee

Please sign in to comment.