Add pool presets, operator bake-ins, and USB pack improvements
- Pool preset checkboxes with failover in Calibrate and Forge - Tier 1/2 UX: setup banner, forge next worker, LAN defaults, blueprint prompt - USB: auto-install forge tools, seed config.json, sync LAUNCH.bat
This commit is contained in:
@@ -48,11 +48,19 @@ type ServerSettings struct {
|
||||
FleetSecret string `json:"fleet_secret"`
|
||||
}
|
||||
|
||||
// PoolEndpoint is a Stratum upstream used after the primary pool fails.
|
||||
type PoolEndpoint struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
UseTLS bool `json:"use_tls"`
|
||||
}
|
||||
|
||||
type PoolConfig struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
UseTLS bool `json:"use_tls"`
|
||||
Password string `json:"password"`
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
UseTLS bool `json:"use_tls"`
|
||||
Password string `json:"password"`
|
||||
BackupPools []PoolEndpoint `json:"backup_pools,omitempty"`
|
||||
}
|
||||
|
||||
type WalletConfig struct {
|
||||
@@ -111,9 +119,13 @@ func DefaultConfig() *Config {
|
||||
DataDir: "data",
|
||||
Pool: PoolConfig{
|
||||
Host: "pool.supportxmr.com",
|
||||
Port: 3333,
|
||||
Port: 443,
|
||||
UseTLS: true,
|
||||
Password: "x",
|
||||
BackupPools: []PoolEndpoint{
|
||||
{Host: "gulf.moneroocean.stream", Port: 20128, UseTLS: true},
|
||||
{Host: "xmr.herominers.com", Port: 1120, UseTLS: true},
|
||||
},
|
||||
},
|
||||
Wallet: WalletConfig{
|
||||
Address: "",
|
||||
@@ -152,7 +164,7 @@ func DefaultConfig() *Config {
|
||||
RejectionRateThresholdPct: 5,
|
||||
},
|
||||
Server: ServerSettings{
|
||||
PublicURL: "https://killa.thetempleofdoom.com",
|
||||
PublicURL: "",
|
||||
StatsRetentionHours: 168,
|
||||
BuildRetentionDays: 30,
|
||||
PoolReconnectSeconds: 30,
|
||||
@@ -219,6 +231,9 @@ func mergeConfig(dst, src *Config) {
|
||||
if src.Pool.Password != "" {
|
||||
dst.Pool.Password = src.Pool.Password
|
||||
}
|
||||
if len(src.Pool.BackupPools) > 0 {
|
||||
dst.Pool.BackupPools = append([]PoolEndpoint(nil), src.Pool.BackupPools...)
|
||||
}
|
||||
if src.Wallet.Address != "" {
|
||||
dst.Wallet.Address = src.Wallet.Address
|
||||
}
|
||||
@@ -420,6 +435,9 @@ func mergeConfigExplicit(dst, src *Config, present map[string]json.RawMessage) {
|
||||
if in(poolKeys, "password") && src.Pool.Password != "" {
|
||||
dst.Pool.Password = src.Pool.Password
|
||||
}
|
||||
if in(poolKeys, "backup_pools") {
|
||||
dst.Pool.BackupPools = append([]PoolEndpoint(nil), src.Pool.BackupPools...)
|
||||
}
|
||||
}
|
||||
|
||||
if has("wallet") {
|
||||
@@ -555,7 +573,7 @@ func mergeConfigExplicit(dst, src *Config, present map[string]json.RawMessage) {
|
||||
|
||||
if has("server") {
|
||||
srvKeys := nestedJSONKeys(present, "server")
|
||||
if in(srvKeys, "public_url") && src.Server.PublicURL != "" {
|
||||
if in(srvKeys, "public_url") {
|
||||
dst.Server.PublicURL = src.Server.PublicURL
|
||||
}
|
||||
if in(srvKeys, "stats_retention_hours") && src.Server.StatsRetentionHours != 0 {
|
||||
|
||||
Reference in New Issue
Block a user