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

Method loadWallet

src/wallet/interfaces.cpp:578–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576 }
577 }
578 util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) override
579 {
580 DatabaseOptions options;
581 DatabaseStatus status;
582 ReadDatabaseArgs(*m_context.args, options);
583 options.require_existing = true;
584 bilingual_str error;
585 std::unique_ptr<Wallet> wallet{MakeWallet(m_context, LoadWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
586 if (wallet) {
587 return wallet;
588 } else {
589 return util::Error{error};
590 }
591 }
592 util::Result<std::unique_ptr<Wallet>> restoreWallet(const fs::path& backup_file, const std::string& wallet_name, std::vector<bilingual_str>& warnings, bool load_after_restore) override
593 {
594 DatabaseStatus status;

Callers 1

openMethod · 0.80

Calls 3

LoadWalletFunction · 0.85
ReadDatabaseArgsFunction · 0.70
MakeWalletFunction · 0.70

Tested by

no test coverage detected