From 815d3090bf799425eac41448d301297de1cd0cf7 Mon Sep 17 00:00:00 2001 From: ShauryaaSharma Date: Sun, 21 Jun 2026 01:43:33 +0530 Subject: [PATCH] qt: warn about rescan in wallet migration dialogs Migrating a legacy wallet triggers a blockchain rescan immediately after conversion. Depending on the chain size and whether -blockfilterindex is active, this rescan can take anywhere from minutes to hours, with no visual indication that anything is happening. Add a rescan warning to the informative text of both migration confirmation dialogs (migrate and restore-and-migrate) so users can plan accordingly before clicking Confirm. Also update the progress dialog label in do_migrate() to state that a blockchain rescan will follow migration, giving users context while the operation runs. Fixes #930 --- src/qt/walletcontroller.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index 1d6153d49a1..37f0561556e 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -448,7 +448,10 @@ void MigrateWalletActivity::do_migrate(const std::string& name) if (dlg.exec() == QDialog::Rejected) return; } - showProgressDialog(tr("Migrate Wallet"), tr("Migrating Wallet %1…").arg(GUIUtil::HtmlEscape(name))); + showProgressDialog(tr("Migrate Wallet"), + tr("Migrating Wallet %1

" + "A blockchain rescan will follow and may take a significant amount of time.") + .arg(GUIUtil::HtmlEscape(name))); QTimer::singleShot(0, worker(), [this, name, passphrase] { auto res{node().walletLoader().migrateWallet(name, passphrase)}; @@ -481,7 +484,9 @@ void MigrateWalletActivity::migrate(const std::string& name) "If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n" "The migration process will create a backup of the wallet before migrating. This backup file will be named " "-.legacy.bak and can be found in the directory for this wallet. In the event of " - "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality.")); + "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality.\n\n" + "After migration, the wallet will be rescanned for transactions. Depending on the size of the blockchain " + "and whether block filter indexes are available, this rescan may take a significant amount of time.")); box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel); box.setDefaultButton(QMessageBox::Yes); if (box.exec() != QMessageBox::Yes) return; @@ -502,7 +507,9 @@ void MigrateWalletActivity::restore_and_migrate(const fs::path& path, const std: "If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n" "The migration process will create a backup of the wallet before migrating. This backup file will be named " "-.legacy.bak and can be found in the directory for this wallet. In the event of " - "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality.")); + "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality.\n\n" + "After migration, the wallet will be rescanned for transactions. Depending on the size of the blockchain " + "and whether block filter indexes are available, this rescan may take a significant amount of time.")); box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel); box.setDefaultButton(QMessageBox::Yes); if (box.exec() != QMessageBox::Yes) return;