diff options
author | Pierre Rochard <pierre@rochard.org> | 2018-09-14 14:13:16 -0400 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-03-12 23:25:36 +0000 |
commit | 85c6263ddbde7189bbb52317dd3ad9202b5ebf40 (patch) | |
tree | 7ec1990bfbeb86706ceb4183838a2921c925c140 /src/wallet | |
parent | f22d02f5371efcaa48a8d5d1b8cd31c65d8235f3 (diff) |
Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment
Github-Pull: #11911
Rebased-From: 14bc2a1
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/db.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 624b4c609b..408713c0c6 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -84,6 +84,13 @@ bool IsWalletLoaded(const fs::path& wallet_path) return database && database->IsDatabaseLoaded(database_filename); } +/** + * @param[in] wallet_path Path to wallet directory. Or (for backwards compatibility only) a path to a berkeley btree data file inside a wallet directory. + * @param[out] database_filename Filename of berkeley btree data file inside the wallet directory. + * @return A shared pointer to the BerkeleyEnvironment object for the wallet directory, 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; @@ -218,6 +225,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 BerkeleyEnvironment::BerkeleyEnvironment() { Reset(); |