diff options
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r-- | src/wallet/db.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h index 467ed13b45..8f96483a18 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -11,13 +11,14 @@ #include <serialize.h> #include <streams.h> #include <sync.h> -#include <util.h> +#include <util/system.h> #include <version.h> #include <atomic> #include <map> #include <memory> #include <string> +#include <unordered_map> #include <vector> #include <db_cxx.h> @@ -25,6 +26,11 @@ static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100; static const bool DEFAULT_WALLET_PRIVDB = true; +struct WalletDatabaseFileId { + u_int8_t value[DB_FILE_ID_LEN]; + bool operator==(const WalletDatabaseFileId& rhs) const; +}; + class BerkeleyEnvironment { private: @@ -38,6 +44,7 @@ public: std::unique_ptr<DbEnv> dbenv; std::map<std::string, int> mapFileUseCount; std::map<std::string, Db*> mapDb; + std::unordered_map<std::string, WalletDatabaseFileId> m_fileids; std::condition_variable_any m_db_in_use; BerkeleyEnvironment(const fs::path& env_directory); |