feat(lite): add "Redownload blocks" (rescan from lite server) to Settings
Add a maintenance option for the lite wallet to re-download and re-scan every block from the lite server — useful when balances or history look wrong. - LiteWalletController::startRescan() runs the backend `rescan` command (which clears the wallet's synced block cache and re-syncs from its birthday) on a detached thread, reusing the existing sync progress/refresh machinery: it resets syncDone_ so refreshModel() shows progress again and refreshes data on completion. No-op if no wallet is open or a scan is already running. - scanInProgress() exposes the initial-sync-or-rescan state. - Settings (lite, open wallet) gains a "Redownload blocks" button behind a confirmation modal, disabled while a scan is running. i18n strings added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,15 @@ public:
|
||||
// op produces a ready wallet; safe to call once.
|
||||
void startSync();
|
||||
|
||||
// Re-download and re-scan every block from the lite server: runs the backend `rescan`
|
||||
// command (which clears the wallet's synced block cache and re-syncs from its birthday
|
||||
// height) on a detached thread, reusing the sync progress + refresh machinery. No-op if no
|
||||
// wallet is open or a scan is already running. True if a rescan was actually started.
|
||||
bool startRescan();
|
||||
|
||||
// True while the initial sync OR a rescan is actively scanning (not yet complete).
|
||||
bool scanInProgress() const { return syncStarted_ && !(syncDone_ && syncDone_->load()); }
|
||||
|
||||
// Generate a new address (shielded if true, else transparent) via the backend. Fast (local
|
||||
// key derivation), safe to call on the UI thread; the next refresh lists the new address.
|
||||
LiteNewAddressResult newAddress(bool shielded);
|
||||
|
||||
Reference in New Issue
Block a user