Browse Source

Debug

master
yuriy0803 5 years ago
parent
commit
7c1950f517
  1. 1
      api.json
  2. 1
      proxy/config.go
  3. 5
      proxy/handlers.go

1
api.json

@ -17,6 +17,7 @@
"hashrateExpiration": "3h", "hashrateExpiration": "3h",
"healthCheck": true, "healthCheck": true,
"debug": true,
"maxFails": 100, "maxFails": 100,
"stratum": { "stratum": {

1
proxy/config.go

@ -45,6 +45,7 @@ type Proxy struct {
MaxFails int64 `json:"maxFails"` MaxFails int64 `json:"maxFails"`
HealthCheck bool `json:"healthCheck"` HealthCheck bool `json:"healthCheck"`
Debug bool `json:"debug"`
Stratum Stratum `json:"stratum"` Stratum Stratum `json:"stratum"`

5
proxy/handlers.go

@ -86,7 +86,10 @@ func (s *ProxyServer) handleSubmitRPC(cs *Session, login, id string, params []st
cs.lastErr = errors.New("Invalid share") cs.lastErr = errors.New("Invalid share")
} }
} }
log.Printf("Valid share from %s@%s", login, cs.ip)
if s.config.Proxy.Debug {
log.Printf("Valid share from %s@%s", login, cs.ip)
}
if !ok { if !ok {
cs.lastErr = errors.New("High rate of invalid shares") cs.lastErr = errors.New("High rate of invalid shares")

Loading…
Cancel
Save