feat(mining): pool registry, schema-aware stats fetcher, pool-select setting
Data + service layer for supporting multiple mining pools: - pool_registry: KnownPool table (pool.dragonx.is + pool.dragonx.cc) carrying each pool's stratum host, xmrig algo, and stats-API schema; pure helpers findKnownPoolByUrl / resolvePoolAlgo / parsePoolHashrate / chooseWeightedPool (weighted-random by hashrate with incumbent stickiness). - pool_stats_service: background, schema-aware hashrate fetcher (libcurl, TLS, browser UA for Cloudflare) modelled on XmrigUpdater. - settings: pool_select_mode (manual | auto_balance), string-serialized. - i18n strings + unit tests (both stats schemas, algo resolution, weighted pick). Note: pool.dragonx.cc's stratum host is us.dragonx.cc:3333 — the .cc domain is only the Cloudflare-proxied web/API host and does not accept stratum on :3333. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1110,6 +1110,17 @@ void I18n::loadBuiltinEnglish()
|
||||
strings_["mining_pool"] = "Pool";
|
||||
strings_["mining_pool_hashrate"] = "Pool Hashrate";
|
||||
strings_["mining_pool_url"] = "Pool URL";
|
||||
// Pool selection mode + auto-balance (mining tab).
|
||||
strings_["mining_select_manual"] = "Manual";
|
||||
strings_["mining_select_auto"] = "Auto-balance";
|
||||
strings_["mining_manual_desc"] = "Manual: mine to the pool you pick from the list below.";
|
||||
strings_["mining_auto_balance_desc"] = "Spreads miners across the official pools by hashrate to help decentralize the network. Checks each pool periodically.";
|
||||
strings_["mining_suggested_pools"] = "Suggested pools";
|
||||
strings_["mining_pools_header"] = "POOLS";
|
||||
strings_["mining_pool_fee"] = "Fee";
|
||||
strings_["mining_mining_here"] = "mining here";
|
||||
strings_["mining_refresh"] = "Refresh";
|
||||
strings_["mining_auto_balanced_to"] = "Auto-balanced mining to";
|
||||
strings_["mining_recent_blocks"] = "RECENT BLOCKS";
|
||||
strings_["mining_recent_payouts"] = "RECENT POOL PAYOUTS";
|
||||
strings_["mining_remove"] = "Remove";
|
||||
|
||||
Reference in New Issue
Block a user