Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.cpp
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | bool IsBDBWalletLoaded(const fs::path &wallet_path) { | ||||
if (env == g_dbenvs.end()) { | if (env == g_dbenvs.end()) { | ||||
return false; | return false; | ||||
} | } | ||||
auto database = env->second.lock(); | auto database = env->second.lock(); | ||||
return database && database->IsDatabaseLoaded(database_filename); | return database && database->IsDatabaseLoaded(database_filename); | ||||
} | } | ||||
bool IsWalletLoaded(const fs::path &wallet_path) { | |||||
return IsBDBWalletLoaded(wallet_path); | |||||
} | |||||
fs::path WalletDataFilePath(const fs::path &wallet_path) { | fs::path WalletDataFilePath(const fs::path &wallet_path) { | ||||
fs::path env_directory; | fs::path env_directory; | ||||
std::string database_filename; | std::string database_filename; | ||||
SplitWalletPath(wallet_path, env_directory, database_filename); | SplitWalletPath(wallet_path, env_directory, database_filename); | ||||
return env_directory / database_filename; | return env_directory / database_filename; | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines |