From 29c16740948961ea99557ef83579ff53ff2c7a8e Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 13 Oct 2026 17:42:30 -0500 Subject: [PATCH] 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 --- src/app.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index b9478b8..32ebca3 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -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();