fix(mining): honour the pool Refresh button in Manual mode

The pool auto-balance step returned early whenever the pool selector was
in Manual mode, so a pending manual Refresh of the pool display stats was
dropped and the button did nothing unless Auto-balance was active.

- A pending refresh is now serviced in Manual mode too, re-querying the
  pool display stats without auto-switching the pool or restarting xmrig.
- Auto-balance behaviour is unchanged; the manual path is display-only,
  so it runs with no benchmark gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 17:42:30 -05:00
co-authored by Claude Opus 4.8
parent 95605dd7e9
commit 29c1674094
+14 -2
View File
@@ -206,8 +206,20 @@ void App::updatePoolAutoBalance()
{
if (!settings_) return;
if (!supportsPoolMining()) return; // pool mining is available in both builds (solo is full-node only)
if (settings_->getPoolSelectMode() != config::Settings::PoolSelectMode::AutoBalance) return;
if (!settings_->getPoolMode()) return; // only while POOL mode is selected
const bool autoMode =
settings_->getPoolSelectMode() == config::Settings::PoolSelectMode::AutoBalance;
// Manual mode (or POOL mode off): honour a manual Refresh of the DISPLAY stats only — never
// auto-switch the pool or restart xmrig. Display-only, so no benchmark gate here.
if (!autoMode || !settings_->getPoolMode()) {
if (balance_refresh_pending_ && settings_->getPoolMode() && !pool_stats_service_.busy()) {
balance_refresh_pending_ = false;
pool_stats_service_.refresh(util::knownPools());
}
return; // do NOT fall into applyPoolAutoBalance
}
if (ui::IsMiningBenchmarkActive()) return; // don't auto-switch pools mid-benchmark — it restarts xmrig at the wrong thread count (L-12)
const long long now = steadyNowMs();