From b9b2d469d4ba2c138aa4598f40425cacf54e5dae Mon Sep 17 00:00:00 2001 From: DanS Date: Fri, 12 Jun 2026 18:47:01 -0500 Subject: [PATCH] fix(rescan): stop the per-second getmininginfo error flood during rescan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While the daemon processes -rescan it sits in RPC warmup and rejects every call with -28 ("Rescanning..."). The balance/tx/address refreshes already skip warmup (state_.warming_up), but the 1-second mining poll didn't — so getmininginfo fired the whole rescan and flooded the log with "getMiningInfo error: Rescanning..." (~680 entries in one capture). Gate refreshMiningInfo() on !state_.warming_up like the other refreshes. The getrescaninfo progress poll still runs (it's how the warmup/rescan is tracked). Co-Authored-By: Claude Opus 4.8 --- src/app.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index 3dda687..c2b4db2 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -586,8 +586,13 @@ void App::update() // would delay the PIN unlock worker task. if (network_refresh_.consumeDue(RefreshTimer::Fast)) { if (rpcConnected && !state_.isLocked()) { - refreshMiningInfo(); - + // Skip the mining poll while the daemon is in warmup (e.g. during -rescan). Otherwise + // getmininginfo is rejected with -28 ("Rescanning...") every second and floods the log. + // The rescan progress poll below still runs — that's how we track the warmup/rescan. + if (!state_.warming_up) { + refreshMiningInfo(); + } + // Poll getrescaninfo for rescan progress (if rescan flag is set) // Use fast_rpc_ when available to avoid blocking on rpc_'s // curl_mutex (which may be held by a long-running import).