From a828cee4959b2c00363c98334768533ba4adcfe5 Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:32:22 +0100 Subject: [PATCH] config "algo" --- api.json | 1 + proxy/proto.go | 1 + proxy/stratum.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/api.json b/api.json index edfa33a..d55dd74 100644 --- a/api.json +++ b/api.json @@ -5,6 +5,7 @@ "pplns": 9000, "network": "classic", "coin-name": "ETC", + "algo": "etchash", "proxy": { "enabled": true, "listen": "0.0.0.0:8888", diff --git a/proxy/proto.go b/proxy/proto.go index 25d38a9..f6d0751 100644 --- a/proxy/proto.go +++ b/proxy/proto.go @@ -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 { diff --git a/proxy/stratum.go b/proxy/stratum.go index a0f97f8..e242d11 100644 --- a/proxy/stratum.go +++ b/proxy/stratum.go @@ -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) } @@ -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)