Skip to content

Commit f6fc5f3

Browse files
committed
walletdb: Add IsBDBWalletLoaded to look for BDB wallets specifically
1 parent c3538f4 commit f6fc5f3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/wallet/db.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void SplitWalletPath(const fs::path& wallet_path, fs::path& env_directory, std::
6767
}
6868
}
6969

70-
bool IsWalletLoaded(const fs::path& wallet_path)
70+
bool IsBDBWalletLoaded(const fs::path& wallet_path)
7171
{
7272
fs::path env_directory;
7373
std::string database_filename;
@@ -79,6 +79,11 @@ bool IsWalletLoaded(const fs::path& wallet_path)
7979
return database && database->IsDatabaseLoaded(database_filename);
8080
}
8181

82+
bool IsWalletLoaded(const fs::path& wallet_path)
83+
{
84+
return IsBDBWalletLoaded(wallet_path);
85+
}
86+
8287
fs::path WalletDataFilePath(const fs::path& wallet_path)
8388
{
8489
fs::path env_directory;

src/wallet/db.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class BerkeleyEnvironment
8787
};
8888

8989
/** Return whether a wallet database is currently loaded. */
90+
bool IsBDBWalletLoaded(const fs::path& wallet_path);
9091
bool IsWalletLoaded(const fs::path& wallet_path);
9192

9293
/** Given a wallet directory path or legacy file path, return path to main data file in the wallet database. */

0 commit comments

Comments
 (0)