diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-06-15 16:10:08 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-06-15 17:36:08 -0400 |
commit | 25a655794a0c495332dadedd88b87d694c1077c2 (patch) | |
tree | fcab4b1e55e2d8018b125a83944579a702963094 /src | |
parent | f6fc5f3849bac48dfccd015bec7089cb711d0667 (diff) |
walletdb: move IsWalletLoaded to walletdb.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/db.cpp | 5 | ||||
-rw-r--r-- | src/wallet/db.h | 1 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 5 | ||||
-rw-r--r-- | src/wallet/walletdb.h | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 11b5992d80..99ad963f9a 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -79,11 +79,6 @@ bool IsBDBWalletLoaded(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 bc4b361c11..3c7c4c1255 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -88,7 +88,6 @@ 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. */ fs::path WalletDataFilePath(const fs::path& wallet_path); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index cb516f70f0..2f6c2b883a 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1018,3 +1018,8 @@ bool WalletBatch::TxnAbort() { return m_batch.TxnAbort(); } + +bool IsWalletLoaded(const fs::path& wallet_path) +{ + return IsBDBWalletLoaded(wallet_path); +} diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index b95ed24d12..74ab144177 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -289,4 +289,7 @@ void MaybeCompactWalletDB(); //! Unserialize a given Key-Value pair and load it into the wallet 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 |