ix ckpool.conf render dropping the TLS bind port; Let deployments declare what each stratum bind is
This commit is contained in:
@@ -7,6 +7,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
@@ -65,6 +66,18 @@ func main() {
|
||||
agg := state.New(ck, rpc, cfg.PollInterval, log)
|
||||
agg.Store = blockStore
|
||||
agg.MempoolBaseURL = cfg.MempoolBaseURL
|
||||
// Purely descriptive (it drives the dashboard's connection badge), so a
|
||||
// malformed value degrades to the UI's fallback rather than refusing to
|
||||
// start a pool that is otherwise fine.
|
||||
if cfg.StratumServersJSON != "" {
|
||||
var servers []state.StratumServer
|
||||
if err := json.Unmarshal([]byte(cfg.StratumServersJSON), &servers); err != nil {
|
||||
log.Warn("ignoring malformed STRATUM_SERVERS", "err", err)
|
||||
} else {
|
||||
agg.StratumServers = servers
|
||||
log.Info("stratum binds declared", "count", len(servers))
|
||||
}
|
||||
}
|
||||
agg.LogFilePath = cfg.CKPoolLogFile
|
||||
agg.KillCKPool = killCKPool(log)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user