aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-05-13 19:31:40 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-06-15 17:36:06 -0400
commitf6fc5f3849bac48dfccd015bec7089cb711d0667 (patch)
tree87481df4e470ed3da6be5b1397d20fea7b6f9c3f
parentc3538f435af8c408759d9d005e80b2f1690e0659 (diff)
walletdb: Add IsBDBWalletLoaded to look for BDB wallets specifically
-rw-r--r--src/wallet/db.cpp7
-rw-r--r--src/wallet/db.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index f694ffc71c..11b5992d80 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -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;
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 5041a7f916..bc4b361c11 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -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. */