Browse Source

config "algo"

master
yuriy0803 2 years ago
parent
commit
a828cee495
  1. 1
      api.json
  2. 1
      proxy/proto.go
  3. 2
      proxy/stratum.go

1
api.json

@ -5,6 +5,7 @@
"pplns": 9000, "pplns": 9000,
"network": "classic", "network": "classic",
"coin-name": "ETC", "coin-name": "ETC",
"algo": "etchash",
"proxy": { "proxy": {
"enabled": true, "enabled": true,
"listen": "0.0.0.0:8888", "listen": "0.0.0.0:8888",

1
proxy/proto.go

@ -13,6 +13,7 @@ type JSONStratumReq struct {
Method string `json:"method"` Method string `json:"method"`
Params interface{} `json:"params"` Params interface{} `json:"params"`
Height string `json:"height"` Height string `json:"height"`
Algo string `json:"algo"`
} }
type StratumReq struct { type StratumReq struct {

2
proxy/stratum.go

@ -439,6 +439,7 @@ func (cs *Session) pushNewJob(s *ProxyServer, result interface{}) error {
}, },
Height: util.ToHex1(int64(a.Height)), Height: util.ToHex1(int64(a.Height)),
Algo: s.config.Algo,
} }
return cs.enc.Encode(&resp) return cs.enc.Encode(&resp)
} }
@ -536,6 +537,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: s.config.Algo,
} }
return cs.sendTCPReq(resp) return cs.sendTCPReq(resp)

Loading…
Cancel
Save