mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
walletdb: Add IsBDBWalletLoaded to look for BDB wallets specifically
This commit is contained in:
@@ -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;
|
fs::path env_directory;
|
||||||
std::string database_filename;
|
std::string database_filename;
|
||||||
@@ -79,6 +79,11 @@ bool IsWalletLoaded(const fs::path& wallet_path)
|
|||||||
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;
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** Return whether a wallet database is currently loaded. */
|
/** Return whether a wallet database is currently loaded. */
|
||||||
|
bool IsBDBWalletLoaded(const fs::path& wallet_path);
|
||||||
bool IsWalletLoaded(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. */
|
/** Given a wallet directory path or legacy file path, return path to main data file in the wallet database. */
|
||||||
|
|||||||
Reference in New Issue
Block a user