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

Method createWallet

src/wallet/interfaces.cpp:562–577  ·  view source on GitHub ↗

WalletLoader methods

Source from the content-addressed store, hash-verified

560
561 //! WalletLoader methods
562 util::Result<std::unique_ptr<Wallet>> createWallet(const std::string& name, const SecureString& passphrase, uint64_t wallet_creation_flags, std::vector<bilingual_str>& warnings) override
563 {
564 DatabaseOptions options;
565 DatabaseStatus status;
566 ReadDatabaseArgs(*m_context.args, options);
567 options.require_create = true;
568 options.create_flags = wallet_creation_flags;
569 options.create_passphrase = passphrase;
570 bilingual_str error;
571 std::unique_ptr<Wallet> wallet{MakeWallet(m_context, CreateWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
572 if (wallet) {
573 return wallet;
574 } else {
575 return util::Error{error};
576 }
577 }
578 util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) override
579 {
580 DatabaseOptions options;

Callers

nothing calls this directly

Calls 3

CreateWalletFunction · 0.85
ReadDatabaseArgsFunction · 0.70
MakeWalletFunction · 0.70

Tested by

no test coverage detected