wallet::CWallet::LoadExisting

Initializes, loads, and returns a CWallet from an existing wallet; returns a null pointer in case of an error

Synopsis

Declared in <wallet/wallet.h>

static
std::shared_ptr<CWallet>
LoadExisting(
    WalletContext& context,
    std::string const& name,
    std::unique_ptr<WalletDatabase> database,
    bilingual_str& error,
    std::vector<bilingual_str>& warnings);

Return Value

The loaded wallet, or nullptr on failure.

Parameters

NameDescription
contextThe wallet context to load into.
nameThe name of the wallet to load.
databaseThe database backend of the existing wallet.
errorSet to an error message on failure.
warningsWarnings produced while loading.