diff --git a/src/wallet/db.h b/src/wallet/db.h --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -82,7 +82,6 @@ /** 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 diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -94,10 +94,6 @@ 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; std::string database_filename; diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -311,4 +311,7 @@ bool ReadKeyValue(CWallet *pwallet, CDataStream &ssKey, CDataStream &ssValue, std::string &strType, std::string &strErr); +/** Return whether a wallet database is currently loaded. */ +bool IsWalletLoaded(const fs::path &wallet_path); + #endif // BITCOIN_WALLET_WALLETDB_H diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1017,3 +1017,7 @@ bool WalletBatch::TxnAbort() { return m_batch.TxnAbort(); } + +bool IsWalletLoaded(const fs::path &wallet_path) { + return IsBDBWalletLoaded(wallet_path); +}