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

Method migrateWallet

src/wallet/interfaces.cpp:602–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600 return wallet;
601 }
602 util::Result<WalletMigrationResult> migrateWallet(const std::string& name, const SecureString& passphrase) override
603 {
604 auto res = wallet::MigrateLegacyToDescriptor(name, passphrase, m_context);
605 if (!res) return util::Error{util::ErrorString(res)};
606 WalletMigrationResult out{
607 .wallet = MakeWallet(m_context, res->wallet),
608 .watchonly_wallet_name = res->watchonly_wallet_name,
609 .solvables_wallet_name = res->solvables_wallet_name,
610 .backup_path = res->backup_path,
611 };
612 return out;
613 }
614 bool isEncrypted(const std::string& wallet_name) override
615 {
616 auto wallets{GetWallets(m_context)};

Callers 1

do_migrateMethod · 0.80

Calls 3

ErrorStringFunction · 0.85
MakeWalletFunction · 0.70

Tested by

no test coverage detected