MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / migrate

Method migrate

src/qt/walletcontroller.cpp:473–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void MigrateWalletActivity::migrate(const std::string& name)
474{
475 // Warn the user about migration
476 QMessageBox box(m_parent_widget);
477 box.setWindowTitle(tr("Migrate wallet"));
478 box.setText(tr("Are you sure you wish to migrate the wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(GUIUtil::WalletDisplayName(name))));
479 box.setInformativeText(tr("Migrating the wallet will convert this wallet to one or more descriptor wallets. A new wallet backup will need to be made.\n"
480 "If this wallet contains any watchonly scripts, a new wallet will be created which contains those watchonly scripts.\n"
481 "If this wallet contains any solvable but not watched scripts, a different and new wallet will be created which contains those scripts.\n\n"
482 "The migration process will create a backup of the wallet before migrating. This backup file will be named "
483 "<wallet name>-<timestamp>.legacy.bak and can be found in the directory for this wallet. In the event of "
484 "an incorrect migration, the backup can be restored with the \"Restore Wallet\" functionality."));
485 box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel);
486 box.setDefaultButton(QMessageBox::Yes);
487 if (box.exec() != QMessageBox::Yes) return;
488
489 do_migrate(name);
490}
491
492void MigrateWalletActivity::restore_and_migrate(const fs::path& path, const std::string& wallet_name)
493{

Callers 1

createActionsMethod · 0.80

Calls 4

HtmlEscapeFunction · 0.85
WalletDisplayNameFunction · 0.85
setTextMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected