feat(mining): fetch pool hashrates + miner version at startup
Warm the Mining tab's data during App::init() (both off the UI thread) instead of only when the user opens the tab or clicks a mine / auto-balance button: - kick the idempotent one-shot `xmrig --version` detection, and - kick a background pool-stats refresh over the known pools. Gated on supportsPoolMining(). The pool-stats snapshot lands on a later frame and the auto-balance driver's self-throttling still applies, so this is just an earlier first fetch — hashrates + version are visible as soon as the tab opens. Full-node + lite build clean; ctest green; source hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -396,6 +396,14 @@ bool App::init()
|
|||||||
worker_->start();
|
worker_->start();
|
||||||
network_refresh_.markDue(services::NetworkRefreshService::Timer::Price);
|
network_refresh_.markDue(services::NetworkRefreshService::Timer::Price);
|
||||||
|
|
||||||
|
// Warm the Mining tab's data at startup (both async / off the UI thread) so pool
|
||||||
|
// hashrates and the installed miner version are shown as soon as the tab is opened,
|
||||||
|
// instead of only after the user clicks a mine / auto-balance button.
|
||||||
|
if (supportsPoolMining()) {
|
||||||
|
daemon::XmrigManager::startVersionDetection(); // idempotent one-shot `xmrig --version`
|
||||||
|
pool_stats_service_.refresh(util::knownPools()); // snapshot lands on a later frame
|
||||||
|
}
|
||||||
|
|
||||||
// Forward error/warning notifications to the console tab. The channel is the semantic
|
// Forward error/warning notifications to the console tab. The channel is the semantic
|
||||||
// key — the Errors filter keys off ConsoleChannel::Error, and the color/accent bar are
|
// key — the Errors filter keys off ConsoleChannel::Error, and the color/accent bar are
|
||||||
// derived from the channel at draw time.
|
// derived from the channel at draw time.
|
||||||
|
|||||||
Reference in New Issue
Block a user