walletdb: Add IsBDBWalletLoaded to look for BDB wallets specifically

This commit is contained in:
Andrew Chow 2020-05-13 19:31:40 -04:00
parent c3538f435a
commit f6fc5f3849
2 changed files with 7 additions and 1 deletions

View file

@ -67,7 +67,7 @@ void SplitWalletPath(const fs::path& wallet_path, fs::path& env_directory, std::
}
}
bool IsWalletLoaded(const fs::path& wallet_path)
bool IsBDBWalletLoaded(const fs::path& wallet_path)
{
fs::path env_directory;
std::string database_filename;
@ -79,6 +79,11 @@ bool IsWalletLoaded(const fs::path& wallet_path)
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 env_directory;

View file

@ -87,6 +87,7 @@ public:
};
/** Return whether a wallet database is currently loaded. */
bool IsBDBWalletLoaded(const fs::path& wallet_path);
bool IsWalletLoaded(const fs::path& wallet_path);
/** Given a wallet directory path or legacy file path, return path to main data file in the wallet database. */