Bitcoin ABC  0.24.7
P2P Digital Currency
Classes | Namespaces | Variables
txdb.h File Reference
#include <blockfileinfo.h>
#include <coins.h>
#include <dbwrapper.h>
#include <flatfile.h>
#include <primitives/block.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for txdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CCoinsViewDB
 CCoinsView backed by the coin database (chainstate/) More...
 
class  CCoinsViewDBCursor
 Specialization of CCoinsViewCursor to iterate over a CCoinsViewDB. More...
 
class  CBlockTreeDB
 Access to the block database (blocks/index/) More...
 

Namespaces

 Consensus
 

Variables

static constexpr int64_t MIN_DB_CACHE_MB = 4
 min. -dbcache (MiB) More...
 
static constexpr int64_t MAX_DB_CACHE_MB = sizeof(void *) > 4 ? 16384 : 1024
 max. -dbcache (MiB) More...
 
static constexpr int64_t DEFAULT_DB_CACHE_MB = 1024
 -dbcache default (MiB) More...
 
static constexpr int64_t DEFAULT_DB_BATCH_SIZE = 16 << 20
 -dbbatchsize default (bytes) More...
 
static constexpr int64_t MAX_BLOCK_DB_CACHE_MB = 2
 Max memory allocated to block tree DB specific cache, if no -txindex (MiB) More...
 
static constexpr int64_t MAX_TX_INDEX_CACHE_MB = 1024
 Max memory allocated to block tree DB specific cache, if -txindex (MiB) More...
 
static constexpr int64_t MAX_FILTER_INDEX_CACHE_MB = 1024
 Max memory allocated to all block filter index caches combined in MiB. More...
 
static constexpr int64_t MAX_COINS_DB_CACHE_MB = 8
 Max memory allocated to coin DB specific cache (MiB) More...
 
RecursiveMutex cs_main
 Global state. More...
 

Variable Documentation

◆ cs_main

RecursiveMutex cs_main

Global state.

Mutex to guard access to validation specific variables, such as reading or changing the chainstate.

This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details.

The transaction pool has a separate lock to allow reading from it and the chainstate at the same time.

Definition at line 103 of file validation.cpp.

◆ DEFAULT_DB_BATCH_SIZE

constexpr int64_t DEFAULT_DB_BATCH_SIZE = 16 << 20
staticconstexpr

-dbbatchsize default (bytes)

Definition at line 35 of file txdb.h.

◆ DEFAULT_DB_CACHE_MB

constexpr int64_t DEFAULT_DB_CACHE_MB = 1024
staticconstexpr

-dbcache default (MiB)

Definition at line 33 of file txdb.h.

◆ MAX_BLOCK_DB_CACHE_MB

constexpr int64_t MAX_BLOCK_DB_CACHE_MB = 2
staticconstexpr

Max memory allocated to block tree DB specific cache, if no -txindex (MiB)

Definition at line 37 of file txdb.h.

◆ MAX_COINS_DB_CACHE_MB

constexpr int64_t MAX_COINS_DB_CACHE_MB = 8
staticconstexpr

Max memory allocated to coin DB specific cache (MiB)

Definition at line 46 of file txdb.h.

◆ MAX_DB_CACHE_MB

constexpr int64_t MAX_DB_CACHE_MB = sizeof(void *) > 4 ? 16384 : 1024
staticconstexpr

max. -dbcache (MiB)

Definition at line 31 of file txdb.h.

◆ MAX_FILTER_INDEX_CACHE_MB

constexpr int64_t MAX_FILTER_INDEX_CACHE_MB = 1024
staticconstexpr

Max memory allocated to all block filter index caches combined in MiB.

Definition at line 44 of file txdb.h.

◆ MAX_TX_INDEX_CACHE_MB

constexpr int64_t MAX_TX_INDEX_CACHE_MB = 1024
staticconstexpr

Max memory allocated to block tree DB specific cache, if -txindex (MiB)

Definition at line 42 of file txdb.h.

◆ MIN_DB_CACHE_MB

constexpr int64_t MIN_DB_CACHE_MB = 4
staticconstexpr

min. -dbcache (MiB)

Definition at line 29 of file txdb.h.