Browse Source

very important

very important
master
yuriy0803 3 years ago
parent
commit
3c041183a3
  1. 2
      README.md
  2. 3
      api.json
  3. 1
      proxy/config.go
  4. 4
      proxy/stratum.go

2
README.md

@ -285,6 +285,8 @@ otherwise you will get errors on start because of JSON comments.**
"pplns": 9000, "pplns": 9000,
// mordor, classic, ethereum, ropsten or ubiq, callisto, etica, ethereumPow, ethereumFair, expanse // mordor, classic, ethereum, ropsten or ubiq, callisto, etica, ethereumPow, ethereumFair, expanse
"network": "classic", "network": "classic",
// etchash, ethash, ubqhash
"algo": "etchash",
// exchange api coingecko // exchange api coingecko
"coin-name":"etc", "coin-name":"etc",

3
api.json

@ -2,8 +2,9 @@
"threads": 4, "threads": 4,
"coin": "etc", "coin": "etc",
"name": "main", "name": "main",
"pplns": 9000, "pplns": 9000,
"network": "classic", "network": "classic",
"algo": "etchash",
"coin-name":"etc", "coin-name":"etc",
"proxy": { "proxy": {

1
proxy/config.go

@ -18,6 +18,7 @@ type Config struct {
Threads int `json:"threads"` Threads int `json:"threads"`
Network string `json:"network"` Network string `json:"network"`
Algo string `json:"algo"`
Coin string `json:"coin"` Coin string `json:"coin"`
Pplns int64 `json:"pplns"` Pplns int64 `json:"pplns"`
Redis storage.Config `json:"redis"` Redis storage.Config `json:"redis"`

4
proxy/stratum.go

@ -468,7 +468,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.Network, Algo: s.config.Algo,
} }
return cs.enc.Encode(&resp) 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)), Height: util.ToHex1(int64(t.Height)),
Algo: s.config.Network, Algo: s.config.Algo,
} }
return cs.sendTCPReq(resp) return cs.sendTCPReq(resp)

Loading…
Cancel
Save