Skip to content


Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRochard committed Sep 14, 2018
2 parents a35b4ef + 9616f62 commit ea7f829
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/wallet/db.cpp
Expand Up @@ -56,6 +56,13 @@ CCriticalSection cs_db;
std::map<std::string, std::weak_ptr<BerkeleyEnvironment>> g_dbenvs GUARDED_BY(cs_db); //!< Map from directory name to db environment.
} // namespace

* @param[in] wallet_path Either the path for a wallet file or for a directory containing one or more wallet files.
* @param[out] database_filename Assigned to the wallet file name, defaults to wallet.dat if wallet_path is a directory.
* @return A shared pointer to the BerkeleyEnvironment object, never empty because ~BerkeleyEnvironment
* erases the weak pointer from the g_dbenvs map.
* @post A new BerkeleyEnvironment weak pointer is inserted into g_dbenvs if the directory path key was not already in the map.
std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& wallet_path, std::string& database_filename)
fs::path env_directory;
Expand Down Expand Up @@ -202,6 +209,7 @@ bool BerkeleyEnvironment::Open(bool retry)
return true;

//! Construct an in-memory mock Berkeley environment for testing and as a place-holder for g_dbenvs emplace
Expand Down
1 change: 0 additions & 1 deletion src/wallet/db.h
Expand Up @@ -86,7 +86,6 @@ class BerkeleyEnvironment

/** Get BerkeleyEnvironment and database filename given a wallet path. */
std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& wallet_path, std::string& database_filename);

/** An instance of this class represents one database.
Expand Down

0 comments on commit ea7f829

Please sign in to comment.