ix ckpool.conf render dropping the TLS bind port; Let deployments declare what each stratum bind is

This commit is contained in:
2026-08-01 06:22:11 +03:00
parent 2c4c6609ba
commit 8a35b02c7e
10 changed files with 159 additions and 45 deletions
+13
View File
@@ -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)