Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 1,152 Lines • ▼ Show 20 Lines | if (format && options.require_create) { | ||||
path.string())); | path.string())); | ||||
status = DatabaseStatus::FAILED_ALREADY_EXISTS; | status = DatabaseStatus::FAILED_ALREADY_EXISTS; | ||||
return nullptr; | return nullptr; | ||||
} | } | ||||
return MakeBerkeleyDatabase(path, options, status, error); | return MakeBerkeleyDatabase(path, options, status, error); | ||||
} | } | ||||
bool IsWalletLoaded(const fs::path &wallet_path) { | |||||
return IsBDBWalletLoaded(wallet_path); | |||||
} | |||||
/** Return object for accessing database at specified path. */ | /** Return object for accessing database at specified path. */ | ||||
std::unique_ptr<WalletDatabase> CreateWalletDatabase(const fs::path &path) { | std::unique_ptr<WalletDatabase> CreateWalletDatabase(const fs::path &path) { | ||||
std::string filename; | std::string filename; | ||||
return std::make_unique<BerkeleyDatabase>(GetWalletEnv(path, filename), | return std::make_unique<BerkeleyDatabase>(GetWalletEnv(path, filename), | ||||
std::move(filename)); | std::move(filename)); | ||||
} | } | ||||
/** | /** | ||||
Show All 11 Lines |