From 3c041183a307200923b32d0ee4526e9fc28112e5 Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Wed, 3 May 2023 23:46:09 +0200 Subject: [PATCH] very important very important --- README.md | 2 ++ api.json | 3 ++- proxy/config.go | 1 + proxy/stratum.go | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1881335..74dc606 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,8 @@ otherwise you will get errors on start because of JSON comments.** "pplns": 9000, // mordor, classic, ethereum, ropsten or ubiq, callisto, etica, ethereumPow, ethereumFair, expanse "network": "classic", + // etchash, ethash, ubqhash + "algo": "etchash", // exchange api coingecko "coin-name":"etc", diff --git a/api.json b/api.json index 7a27b40..23aac9f 100644 --- a/api.json +++ b/api.json @@ -2,8 +2,9 @@ "threads": 4, "coin": "etc", "name": "main", - "pplns": 9000, + "pplns": 9000, "network": "classic", + "algo": "etchash", "coin-name":"etc", "proxy": { diff --git a/proxy/config.go b/proxy/config.go index 12f3d83..9f7908f 100644 --- a/proxy/config.go +++ b/proxy/config.go @@ -18,6 +18,7 @@ type Config struct { Threads int `json:"threads"` Network string `json:"network"` + Algo string `json:"algo"` Coin string `json:"coin"` Pplns int64 `json:"pplns"` Redis storage.Config `json:"redis"` diff --git a/proxy/stratum.go b/proxy/stratum.go index 43f0fe9..bc7366f 100644 --- a/proxy/stratum.go +++ b/proxy/stratum.go @@ -468,7 +468,7 @@ func (cs *Session) pushNewJob(s *ProxyServer, result interface{}) error { }, Height: util.ToHex1(int64(a.Height)), - Algo: s.config.Network, + Algo: s.config.Algo, } return cs.enc.Encode(&resp) } @@ -568,7 +568,7 @@ func (cs *Session) sendJob(s *ProxyServer, id json.RawMessage, newjob bool) erro }, Height: util.ToHex1(int64(t.Height)), - Algo: s.config.Network, + Algo: s.config.Algo, } return cs.sendTCPReq(resp)