Skip to content

Commit 911a480

Browse files
committed
wallet: Add comment describing the various classes in walletdb.h
1 parent 69d2e9b commit 911a480

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/wallet/walletdb.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@
1717
#include <utility>
1818
#include <vector>
1919

20+
/**
21+
* Overview of wallet database classes:
22+
*
23+
* - CDBEnv is an environment in which the database exists (has no analog in dbwrapper.h)
24+
* - CWalletDBWrapper represents a wallet database (similar to CDBWrapper in dbwrapper.h)
25+
* - CDB is a low-level database transaction (similar to CDBBatch in dbwrapper.h)
26+
* - CWalletDB is a modifier object for the wallet, and encapsulates a database
27+
* transaction as well as methods to act on the database (no analog in
28+
* dbwrapper.h)
29+
*
30+
* The latter two are named confusingly, in contrast to what the names CDB
31+
* and CWalletDB suggest they are transient transaction objects and don't
32+
* represent the database itself.
33+
*/
34+
2035
static const bool DEFAULT_FLUSHWALLET = true;
2136

2237
class CAccount;

0 commit comments

Comments
 (0)