Bitcoin ABC  0.22.13
P2P Digital Currency
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
walletdb.h File Reference
#include <amount.h>
#include <key.h>
#include <script/sign.h>
#include <script/standard.h>
#include <wallet/bdb.h>
#include <wallet/walletutil.h>
#include <cstdint>
#include <string>
#include <vector>
Include dependency graph for walletdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CHDChain
 
class  CKeyMetadata
 
class  WalletBatch
 Access to the wallet database. More...
 

Namespaces

 DBKeys
 

Typedefs

using WalletDatabase = BerkeleyDatabase
 Backend-agnostic database type. More...
 

Enumerations

enum  DBErrors {
  DBErrors::LOAD_OK, DBErrors::CORRUPT, DBErrors::NONCRITICAL_ERROR, DBErrors::TOO_NEW,
  DBErrors::LOAD_FAIL, DBErrors::NEED_REWRITE
}
 Error statuses for the wallet database. More...
 

Functions

void MaybeCompactWalletDB ()
 Compacts BDB state so that wallet.dat is self-contained (if there are changes) More...
 
bool ReadKeyValue (CWallet *pwallet, CDataStream &ssKey, CDataStream &ssValue, std::string &strType, std::string &strErr)
 Unserialize a given Key-Value pair and load it into the wallet. More...
 
bool IsWalletLoaded (const fs::path &wallet_path)
 Return whether a wallet database is currently loaded. More...
 

Variables

static const bool DEFAULT_FLUSHWALLET = true
 Overview of wallet database classes: More...
 

Typedef Documentation

◆ WalletDatabase

Backend-agnostic database type.

Definition at line 46 of file walletdb.h.

Enumeration Type Documentation

◆ DBErrors

enum DBErrors
strong

Error statuses for the wallet database.

Enumerator
LOAD_OK 
CORRUPT 
NONCRITICAL_ERROR 
TOO_NEW 
LOAD_FAIL 
NEED_REWRITE 

Definition at line 49 of file walletdb.h.

Function Documentation

◆ IsWalletLoaded()

bool IsWalletLoaded ( const fs::path &  wallet_path)

Return whether a wallet database is currently loaded.

Definition at line 1008 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaybeCompactWalletDB()

void MaybeCompactWalletDB ( )

Compacts BDB state so that wallet.dat is self-contained (if there are changes)

Definition at line 938 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadKeyValue()

bool ReadKeyValue ( CWallet pwallet,
CDataStream ssKey,
CDataStream ssValue,
std::string &  strType,
std::string &  strErr 
)

Unserialize a given Key-Value pair and load it into the wallet.

Definition at line 649 of file walletdb.cpp.

Here is the call graph for this function:

Variable Documentation

◆ DEFAULT_FLUSHWALLET

const bool DEFAULT_FLUSHWALLET = true
static

Overview of wallet database classes:

  • WalletBatch is an abstract modifier object for the wallet database, and encapsulates a database batch update as well as methods to act on the database. It should be agnostic to the database implementation.

The following classes are implementation specific:

Definition at line 34 of file walletdb.h.