fix(ui): stop spurious "Blockchain rescan complete" toast after restoring from minimize
While minimized the main loop skips the frame body (SDL_Delay+continue), so App::update() — which drains the daemon output via outputSince(daemon_output_offset_) — never runs and the offset isn't advanced. On restore the whole accumulated backlog is parsed in one batch: a background witness rebuild's progress lines (parsed as a rescan → state_.sync.rescanning=true) AND its "rebuilt … in Xms" completion (parsed as finished) arrive together and fire "Blockchain rescan complete" for a scan the user never initiated. On WINDOW_RESTORED, discard the daemon-output backlog (advance the offset to the current end, via App::skipDaemonOutputBacklog) before the resumed update parses it — so only new output is parsed. Genuine user-initiated rescans still surface completion via the getrescaninfo monitor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -393,6 +393,10 @@ public:
|
||||
|
||||
// Force refresh
|
||||
void refreshNow();
|
||||
// Called on window restore: drop the daemon-output backlog that accumulated while minimized (the
|
||||
// per-frame update loop was paused), so a background witness rebuild that started+finished during
|
||||
// the minimize isn't parsed in one batch and mistaken for a completed rescan (spurious toast).
|
||||
void skipDaemonOutputBacklog();
|
||||
void refreshMiningInfo();
|
||||
void refreshPeerInfo();
|
||||
void refreshMarketData();
|
||||
|
||||
Reference in New Issue
Block a user