Bitcoin Core  24.99.0
P2P Digital Currency
Classes | Namespaces | Functions | Variables
walletdb.cpp File Reference
#include <wallet/walletdb.h>
#include <fs.h>
#include <key_io.h>
#include <protocol.h>
#include <serialize.h>
#include <sync.h>
#include <util/bip32.h>
#include <util/system.h>
#include <util/time.h>
#include <util/translation.h>
#include <wallet/wallet.h>
#include <atomic>
#include <optional>
#include <string>
Include dependency graph for walletdb.cpp:

Go to the source code of this file.

Classes

class  wallet::CWalletScanState
 

Namespaces

 wallet
 
 wallet::DBKeys
 

Functions

static bool wallet::ReadKeyValue (CWallet *pwallet, CDataStream &ssKey, CDataStream &ssValue, CWalletScanState &wss, std::string &strType, std::string &strErr, const KeyFilterFn &filter_fn=nullptr) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
bool wallet::ReadKeyValue (CWallet *pwallet, CDataStream &ssKey, CDataStream &ssValue, std::string &strType, std::string &strErr, const KeyFilterFn &filter_fn=nullptr)
 Unserialize a given Key-Value pair and load it into the wallet. More...
 
void wallet::MaybeCompactWalletDB (WalletContext &context)
 Compacts BDB state so that wallet.dat is self-contained (if there are changes) More...
 
std::unique_ptr< WalletDatabase > wallet::MakeDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 
std::unique_ptr< WalletDatabase > wallet::CreateDummyWalletDatabase ()
 Return object for accessing dummy database with no read/write capabilities. More...
 
std::unique_ptr< WalletDatabase > wallet::CreateMockWalletDatabase (DatabaseOptions &options)
 Return object for accessing temporary in-memory database. More...
 
std::unique_ptr< WalletDatabase > wallet::CreateMockWalletDatabase ()
 

Variables

const std::string wallet::DBKeys::ACENTRY {"acentry"}
 
const std::string wallet::DBKeys::ACTIVEEXTERNALSPK {"activeexternalspk"}
 
const std::string wallet::DBKeys::ACTIVEINTERNALSPK {"activeinternalspk"}
 
const std::string wallet::DBKeys::BESTBLOCK_NOMERKLE {"bestblock_nomerkle"}
 
const std::string wallet::DBKeys::BESTBLOCK {"bestblock"}
 
const std::string wallet::DBKeys::CRYPTED_KEY {"ckey"}
 
const std::string wallet::DBKeys::CSCRIPT {"cscript"}
 
const std::string wallet::DBKeys::DEFAULTKEY {"defaultkey"}
 
const std::string wallet::DBKeys::DESTDATA {"destdata"}
 
const std::string wallet::DBKeys::FLAGS {"flags"}
 
const std::string wallet::DBKeys::HDCHAIN {"hdchain"}
 
const std::string wallet::DBKeys::KEYMETA {"keymeta"}
 
const std::string wallet::DBKeys::KEY {"key"}
 
const std::string wallet::DBKeys::LOCKED_UTXO {"lockedutxo"}
 
const std::string wallet::DBKeys::MASTER_KEY {"mkey"}
 
const std::string wallet::DBKeys::MINVERSION {"minversion"}
 
const std::string wallet::DBKeys::NAME {"name"}
 
const std::string wallet::DBKeys::OLD_KEY {"wkey"}
 
const std::string wallet::DBKeys::ORDERPOSNEXT {"orderposnext"}
 
const std::string wallet::DBKeys::POOL {"pool"}
 
const std::string wallet::DBKeys::PURPOSE {"purpose"}
 
const std::string wallet::DBKeys::SETTINGS {"settings"}
 
const std::string wallet::DBKeys::TX {"tx"}
 
const std::string wallet::DBKeys::VERSION {"version"}
 
const std::string wallet::DBKeys::WALLETDESCRIPTOR {"walletdescriptor"}
 
const std::string wallet::DBKeys::WALLETDESCRIPTORCACHE {"walletdescriptorcache"}
 
const std::string wallet::DBKeys::WALLETDESCRIPTORLHCACHE {"walletdescriptorlhcache"}
 
const std::string wallet::DBKeys::WALLETDESCRIPTORCKEY {"walletdescriptorckey"}
 
const std::string wallet::DBKeys::WALLETDESCRIPTORKEY {"walletdescriptorkey"}
 
const std::string wallet::DBKeys::WATCHMETA {"watchmeta"}
 
const std::string wallet::DBKeys::WATCHS {"watchs"}
 
const std::unordered_set< std::string > wallet::DBKeys::LEGACY_TYPES {CRYPTED_KEY, CSCRIPT, DEFAULTKEY, HDCHAIN, KEYMETA, KEY, OLD_KEY, POOL, WATCHMETA, WATCHS}