Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
validation.h File Reference
#include <amount.h>
#include <arith_uint256.h>
#include <attributes.h>
#include <chain.h>
#include <fs.h>
#include <policy/feerate.h>
#include <policy/packages.h>
#include <script/script_error.h>
#include <sync.h>
#include <txdb.h>
#include <txmempool.h>
#include <uint256.h>
#include <util/check.h>
#include <util/hasher.h>
#include <util/translation.h>
#include <atomic>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <stdint.h>
#include <string>
#include <thread>
#include <utility>
#include <vector>
Include dependency graph for validation.h:

Go to the source code of this file.

Classes

struct  MempoolAcceptResult
 Validation result for a single transaction mempool acceptance. More...
 
struct  PackageMempoolAcceptResult
 Validation result for package mempool acceptance. More...
 
class  CScriptCheck
 Closure representing one script verification Note that this stores references to the spending transaction. More...
 
class  CVerifyDB
 RAII wrapper for VerifyDB: Verify consistency of the block and coin databases. More...
 
struct  CBlockIndexWorkComparator
 
class  BlockManager
 Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most-work tip is. More...
 
class  CoinsViews
 A convenience class for constructing the CCoinsView* hierarchy used to facilitate access to the UTXO set. More...
 
class  CChainState
 CChainState stores and provides an API to update our local knowledge of the current best chain. More...
 
class  ChainstateManager
 Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate generated by downloading blocks, and an optional snapshot chainstate loaded from a UTXO snapshot. More...
 

Typedefs

typedef std::unordered_map< uint256, CBlockIndex *, BlockHasherBlockMap
 
using FopenFn = std::function< FILE *(const fs::path &, const char *)>
 

Enumerations

enum  SynchronizationState { SynchronizationState::INIT_REINDEX, SynchronizationState::INIT_DOWNLOAD, SynchronizationState::POST_INIT }
 Current sync state passed to tip changed callbacks. More...
 
enum  DisconnectResult { DISCONNECT_OK, DISCONNECT_UNCLEAN, DISCONNECT_FAILED }
 
enum  FlushStateMode { FlushStateMode::NONE, FlushStateMode::IF_NEEDED, FlushStateMode::PERIODIC, FlushStateMode::ALWAYS }
 
enum  CoinsCacheSizeState { CoinsCacheSizeState::CRITICAL = 2, CoinsCacheSizeState::LARGE = 1, CoinsCacheSizeState::OK = 0 }
 

Functions

void UnloadBlockIndex (CTxMemPool *mempool, ChainstateManager &chainman)
 Unload database information. More...
 
void StartScriptCheckWorkerThreads (int threads_num)
 Run instances of script checking worker threads. More...
 
void StopScriptCheckWorkerThreads ()
 Stop all of the script checking worker threads. More...
 
CAmount GetBlockSubsidy (int nHeight, const Consensus::Params &consensusParams)
 
bool AbortNode (BlockValidationState &state, const std::string &strMessage, const bilingual_str &userMessage=bilingual_str{})
 
double GuessVerificationProgress (const ChainTxData &data, const CBlockIndex *pindex)
 Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip). More...
 
void PruneBlockFilesManual (CChainState &active_chainstate, int nManualPruneHeight)
 Prune block files up to a given height. More...
 
MempoolAcceptResult AcceptToMemoryPool (CChainState &active_chainstate, CTxMemPool &pool, const CTransactionRef &tx, bool bypass_limits, bool test_accept=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 (Try to) add a transaction to the memory pool. More...
 
PackageMempoolAcceptResult ProcessNewPackage (CChainState &active_chainstate, CTxMemPool &pool, const Package &txns, bool test_accept) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Atomically test acceptance of a package. More...
 
void UpdateCoins (const CTransaction &tx, CCoinsViewCache &inputs, int nHeight)
 Apply the effects of this transaction on the UTXO set represented by view. More...
 
bool CheckFinalTx (const CBlockIndex *active_chain_tip, const CTransaction &tx, int flags=-1) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Transaction validation functions. More...
 
bool TestLockPointValidity (CChain &active_chain, const LockPoints *lp) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Test whether the LockPoints height and time are still valid on the current chain. More...
 
bool CheckSequenceLocks (CBlockIndex *tip, const CCoinsView &coins_view, const CTransaction &tx, int flags, LockPoints *lp=nullptr, bool useExistingLockPoints=false)
 Check if transaction will be BIP68 final in the next block to be created on top of tip. More...
 
void InitScriptExecutionCache ()
 Initializes the script-execution cache. More...
 
bool CheckBlock (const CBlock &block, BlockValidationState &state, const Consensus::Params &consensusParams, bool fCheckPOW=true, bool fCheckMerkleRoot=true)
 Functions for validating blocks and updating the block tree. More...
 
bool TestBlockValidity (BlockValidationState &state, const CChainParams &chainparams, CChainState &chainstate, const CBlock &block, CBlockIndex *pindexPrev, bool fCheckPOW=true, bool fCheckMerkleRoot=true) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Check a block is completely valid from start to finish (only works on top of our current best block) More...
 
void UpdateUncommittedBlockStructures (CBlock &block, const CBlockIndex *pindexPrev, const Consensus::Params &consensusParams)
 Update uncommitted block structures (currently: only the witness reserved value). More...
 
std::vector< unsigned char > GenerateCoinbaseCommitment (CBlock &block, const CBlockIndex *pindexPrev, const Consensus::Params &consensusParams)
 Produce the necessary coinbase commitment for a block (modifies the hash, don't call for mined blocks). More...
 
bool DumpMempool (const CTxMemPool &pool, FopenFn mockable_fopen_function=fsbridge::fopen, bool skip_file_commit=false)
 Dump the mempool to disk. More...
 
bool LoadMempool (CTxMemPool &pool, CChainState &active_chainstate, FopenFn mockable_fopen_function=fsbridge::fopen)
 Load the mempool from disk. More...
 
const AssumeutxoDataExpectedAssumeutxo (const int height, const CChainParams &params)
 Return the expected assumeutxo value for a given height, if one exists. More...
 

Variables

static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000
 Default for -minrelaytxfee, minimum relay fee for transactions. More...
 
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25
 Default for -limitancestorcount, max number of in-mempool ancestors. More...
 
static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101
 Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors. More...
 
static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25
 Default for -limitdescendantcount, max number of in-mempool descendants. More...
 
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101
 Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants. More...
 
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336
 Default for -mempoolexpiry, expiration time for mempool transactions in hours. More...
 
static const int MAX_SCRIPTCHECK_THREADS = 15
 Maximum number of dedicated script-checking threads allowed. More...
 
static const int DEFAULT_SCRIPTCHECK_THREADS = 0
 -par default (number of script-checking threads, 0 = auto) More...
 
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60
 
static const bool DEFAULT_CHECKPOINTS_ENABLED = true
 
static const bool DEFAULT_TXINDEX = false
 
static constexpr bool DEFAULT_COINSTATSINDEX {false}
 
static const char *const DEFAULT_BLOCKFILTERINDEX = "0"
 
static const bool DEFAULT_PERSIST_MEMPOOL = true
 Default for -persistmempool. More...
 
static const int DEFAULT_STOPATHEIGHT = 0
 Default for -stopatheight. More...
 
static const unsigned int MIN_BLOCKS_TO_KEEP = 288
 Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ::ChainActive().Tip() will not be pruned. More...
 
static const signed int DEFAULT_CHECKBLOCKS = 6
 
static const unsigned int DEFAULT_CHECKLEVEL = 3
 
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024
 
RecursiveMutex cs_main
 Mutex to guard access to validation specific variables, such as reading or changing the chainstate. More...
 
Mutex g_best_block_mutex
 
std::condition_variable g_best_block_cv
 
uint256 g_best_block
 Used to notify getblocktemplate RPC of new tips. More...
 
bool g_parallel_script_checks
 Whether there are dedicated script-checking threads running. More...
 
bool fRequireStandard
 
bool fCheckBlockIndex
 
bool fCheckpointsEnabled
 
CFeeRate minRelayTxFee
 A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) More...
 
int64_t nMaxTipAge
 If the tip is older than this (in seconds), the node is considered to be in initial block download. More...
 
uint256 hashAssumeValid
 Block hash whose ancestors we will assume to have valid scripts without checking them. More...
 
arith_uint256 nMinimumChainWork
 Minimum work we will assume exists on some valid chain. More...
 
CBlockIndexpindexBestHeader
 Best header we've seen so far (used for getheaders queries' starting points). More...
 
const std::vector< std::string > CHECKLEVEL_DOC
 Documentation for argument 'checklevel'. More...
 

Typedef Documentation

◆ BlockMap

typedef std::unordered_map<uint256, CBlockIndex*, BlockHasher> BlockMap

Definition at line 100 of file validation.h.

◆ FopenFn

using FopenFn = std::function<FILE*(const fs::path&, const char*)>

Definition at line 1020 of file validation.h.

Enumeration Type Documentation

◆ CoinsCacheSizeState

enum CoinsCacheSizeState
strong
Enumerator
CRITICAL 

The coins cache is in immediate need of a flush.

LARGE 

The cache is at >= 90% capacity.

OK 

Definition at line 523 of file validation.h.

◆ DisconnectResult

Enumerator
DISCONNECT_OK 
DISCONNECT_UNCLEAN 
DISCONNECT_FAILED 

Definition at line 348 of file validation.h.

◆ FlushStateMode

enum FlushStateMode
strong
See also
CChainState::FlushStateToDisk
Enumerator
NONE 
IF_NEEDED 
PERIODIC 
ALWAYS 

Definition at line 358 of file validation.h.

◆ SynchronizationState

enum SynchronizationState
strong

Current sync state passed to tip changed callbacks.

Enumerator
INIT_REINDEX 
INIT_DOWNLOAD 
POST_INIT 

Definition at line 93 of file validation.h.

Function Documentation

◆ AbortNode()

bool AbortNode ( BlockValidationState state,
const std::string &  strMessage,
const bilingual_str userMessage = bilingual_str{} 
)

Definition at line 1389 of file validation.cpp.

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

◆ AcceptToMemoryPool()

MempoolAcceptResult AcceptToMemoryPool ( CChainState active_chainstate,
CTxMemPool pool,
const CTransactionRef tx,
bool  bypass_limits,
bool  test_accept = false 
)

(Try to) add a transaction to the memory pool.

Parameters
[in]bypass_limitsWhen true, don't enforce mempool fee limits.
[in]test_acceptWhen true, run validation checks but don't submit to mempool.

Definition at line 1045 of file validation.cpp.

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

◆ CheckBlock()

bool CheckBlock ( const CBlock block,
BlockValidationState state,
const Consensus::Params consensusParams,
bool  fCheckPOW = true,
bool  fCheckMerkleRoot = true 
)

Functions for validating blocks and updating the block tree.

Context-independent validity checks

Definition at line 2933 of file validation.cpp.

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

◆ CheckFinalTx()

bool CheckFinalTx ( const CBlockIndex active_chain_tip,
const CTransaction tx,
int  flags = -1 
)

Transaction validation functions.

Check if transaction will be final in the next block to be created.

Calls IsFinalTx() with current block height and appropriate block time.

See consensus/consensus.h for flag definitions.

Definition at line 181 of file validation.cpp.

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

◆ CheckSequenceLocks()

bool CheckSequenceLocks ( CBlockIndex tip,
const CCoinsView coins_view,
const CTransaction tx,
int  flags,
LockPoints lp = nullptr,
bool  useExistingLockPoints = false 
)

Check if transaction will be BIP68 final in the next block to be created on top of tip.

Parameters
[in]tipChain tip to check tx sequence locks against. For example, the tip of the current active chain.
[in]coins_viewAny CCoinsView that provides access to the relevant coins for checking sequence locks. For example, it can be a CCoinsViewCache that isn't connected to anything but contains all the relevant coins, or a CCoinsViewMemPool that is connected to the mempool and chainstate UTXO set. In the latter case, the caller is responsible for holding the appropriate locks to ensure that calls to GetCoin() return correct coins. Simulates calling SequenceLocks() with data from the tip passed in. Optionally stores in LockPoints the resulting height and time calculated and the hash of the block needed for calculation or skips the calculation and uses the LockPoints passed in for evaluation. The LockPoints should not be considered valid if CheckSequenceLocks returns false.

See consensus/consensus.h for flag definitions.

Definition at line 232 of file validation.cpp.

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

◆ DumpMempool()

bool DumpMempool ( const CTxMemPool pool,
FopenFn  mockable_fopen_function = fsbridge::fopen,
bool  skip_file_commit = false 
)

Dump the mempool to disk.

Definition at line 4542 of file validation.cpp.

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

◆ ExpectedAssumeutxo()

const AssumeutxoData* ExpectedAssumeutxo ( const int  height,
const CChainParams params 
)

Return the expected assumeutxo value for a given height, if one exists.

Parameters
[in]heightGet the assumeutxo value for this height.
Returns
empty if no assumeutxo configuration exists for the given height.

Definition at line 4671 of file validation.cpp.

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

◆ GenerateCoinbaseCommitment()

std::vector<unsigned char> GenerateCoinbaseCommitment ( CBlock block,
const CBlockIndex pindexPrev,
const Consensus::Params consensusParams 
)

Produce the necessary coinbase commitment for a block (modifies the hash, don't call for mined blocks).

Definition at line 3019 of file validation.cpp.

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

◆ GetBlockSubsidy()

CAmount GetBlockSubsidy ( int  nHeight,
const Consensus::Params consensusParams 
)

Definition at line 1072 of file validation.cpp.

Here is the caller graph for this function:

◆ GuessVerificationProgress()

double GuessVerificationProgress ( const ChainTxData data,
const CBlockIndex pindex 
)

Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip).

Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip).

Definition at line 4605 of file validation.cpp.

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

◆ InitScriptExecutionCache()

void InitScriptExecutionCache ( )

Initializes the script-execution cache.

Definition at line 1266 of file validation.cpp.

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

◆ LoadMempool()

bool LoadMempool ( CTxMemPool pool,
CChainState active_chainstate,
FopenFn  mockable_fopen_function = fsbridge::fopen 
)

Load the mempool from disk.

Definition at line 4458 of file validation.cpp.

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

◆ ProcessNewPackage()

PackageMempoolAcceptResult ProcessNewPackage ( CChainState active_chainstate,
CTxMemPool pool,
const Package txns,
bool  test_accept 
)

Atomically test acceptance of a package.

If the package only contains one tx, package rules still apply. Package validation does not allow BIP125 replacements, so the transaction(s) cannot spend the same inputs as any transaction in the mempool.

Parameters
[in]txnsGroup of transactions which may be independent or contain parent-child dependencies. The transactions must not conflict with each other, i.e., must not spend the same inputs. If any dependencies exist, parents must appear anywhere in the list before their children.
Returns
a PackageMempoolAcceptResult which includes a MempoolAcceptResult for each transaction. If a transaction fails, validation will exit early and some results may be missing.

Definition at line 1051 of file validation.cpp.

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

◆ PruneBlockFilesManual()

void PruneBlockFilesManual ( CChainState active_chainstate,
int  nManualPruneHeight 
)

Prune block files up to a given height.

Definition at line 3529 of file validation.cpp.

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

◆ StartScriptCheckWorkerThreads()

void StartScriptCheckWorkerThreads ( int  threads_num)

Run instances of script checking worker threads.

Definition at line 1491 of file validation.cpp.

Here is the caller graph for this function:

◆ StopScriptCheckWorkerThreads()

void StopScriptCheckWorkerThreads ( )

Stop all of the script checking worker threads.

Definition at line 1496 of file validation.cpp.

Here is the caller graph for this function:

◆ TestBlockValidity()

bool TestBlockValidity ( BlockValidationState state,
const CChainParams chainparams,
CChainState chainstate,
const CBlock block,
CBlockIndex pindexPrev,
bool  fCheckPOW = true,
bool  fCheckMerkleRoot = true 
)

Check a block is completely valid from start to finish (only works on top of our current best block)

Definition at line 3435 of file validation.cpp.

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

◆ TestLockPointValidity()

bool TestLockPointValidity ( CChain active_chain,
const LockPoints lp 
)

Test whether the LockPoints height and time are still valid on the current chain.

Definition at line 214 of file validation.cpp.

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

◆ UnloadBlockIndex()

void UnloadBlockIndex ( CTxMemPool mempool,
ChainstateManager chainman 
)

Unload database information.

Definition at line 4011 of file validation.cpp.

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

◆ UpdateCoins()

void UpdateCoins ( const CTransaction tx,
CCoinsViewCache inputs,
int  nHeight 
)

Apply the effects of this transaction on the UTXO set represented by view.

Definition at line 1243 of file validation.cpp.

Here is the call graph for this function:

◆ UpdateUncommittedBlockStructures()

void UpdateUncommittedBlockStructures ( CBlock block,
const CBlockIndex pindexPrev,
const Consensus::Params consensusParams 
)

Update uncommitted block structures (currently: only the witness reserved value).

This is safe for submitted blocks.

Definition at line 3007 of file validation.cpp.

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

Variable Documentation

◆ CHECKLEVEL_DOC

const std::vector<std::string> CHECKLEVEL_DOC

Documentation for argument 'checklevel'.

Definition at line 80 of file validation.cpp.

◆ cs_main

RecursiveMutex cs_main

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 117 of file validation.cpp.

◆ DEFAULT_ANCESTOR_LIMIT

const unsigned int DEFAULT_ANCESTOR_LIMIT = 25
static

Default for -limitancestorcount, max number of in-mempool ancestors.

Definition at line 56 of file validation.h.

◆ DEFAULT_ANCESTOR_SIZE_LIMIT

const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101
static

Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors.

Definition at line 58 of file validation.h.

◆ DEFAULT_BLOCKFILTERINDEX

const char* const DEFAULT_BLOCKFILTERINDEX = "0"
static

Definition at line 73 of file validation.h.

◆ DEFAULT_CHECKBLOCKS

const signed int DEFAULT_CHECKBLOCKS = 6
static

Definition at line 80 of file validation.h.

◆ DEFAULT_CHECKLEVEL

const unsigned int DEFAULT_CHECKLEVEL = 3
static

Definition at line 81 of file validation.h.

◆ DEFAULT_CHECKPOINTS_ENABLED

const bool DEFAULT_CHECKPOINTS_ENABLED = true
static

Definition at line 70 of file validation.h.

◆ DEFAULT_COINSTATSINDEX

constexpr bool DEFAULT_COINSTATSINDEX {false}
staticconstexpr

Definition at line 72 of file validation.h.

◆ DEFAULT_DESCENDANT_LIMIT

const unsigned int DEFAULT_DESCENDANT_LIMIT = 25
static

Default for -limitdescendantcount, max number of in-mempool descendants.

Definition at line 60 of file validation.h.

◆ DEFAULT_DESCENDANT_SIZE_LIMIT

const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101
static

Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants.

Definition at line 62 of file validation.h.

◆ DEFAULT_MAX_TIP_AGE

const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60
static

Definition at line 69 of file validation.h.

◆ DEFAULT_MEMPOOL_EXPIRY

const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336
static

Default for -mempoolexpiry, expiration time for mempool transactions in hours.

Definition at line 64 of file validation.h.

◆ DEFAULT_MIN_RELAY_TX_FEE

const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000
static

Default for -minrelaytxfee, minimum relay fee for transactions.

Definition at line 54 of file validation.h.

◆ DEFAULT_PERSIST_MEMPOOL

const bool DEFAULT_PERSIST_MEMPOOL = true
static

Default for -persistmempool.

Definition at line 75 of file validation.h.

◆ DEFAULT_SCRIPTCHECK_THREADS

const int DEFAULT_SCRIPTCHECK_THREADS = 0
static

-par default (number of script-checking threads, 0 = auto)

Definition at line 68 of file validation.h.

◆ DEFAULT_STOPATHEIGHT

const int DEFAULT_STOPATHEIGHT = 0
static

Default for -stopatheight.

Definition at line 77 of file validation.h.

◆ DEFAULT_TXINDEX

const bool DEFAULT_TXINDEX = false
static

Definition at line 71 of file validation.h.

◆ fCheckBlockIndex

bool fCheckBlockIndex

Definition at line 125 of file validation.cpp.

◆ fCheckpointsEnabled

bool fCheckpointsEnabled

Definition at line 126 of file validation.cpp.

◆ fRequireStandard

bool fRequireStandard

Definition at line 124 of file validation.cpp.

◆ g_best_block

uint256 g_best_block

Used to notify getblocktemplate RPC of new tips.

Definition at line 122 of file validation.cpp.

◆ g_best_block_cv

std::condition_variable g_best_block_cv

Definition at line 121 of file validation.cpp.

◆ g_best_block_mutex

Mutex g_best_block_mutex

Definition at line 120 of file validation.cpp.

◆ g_parallel_script_checks

bool g_parallel_script_checks

Whether there are dedicated script-checking threads running.

False indicates all script checking is done on the main threadMessageHandler thread.

Definition at line 123 of file validation.cpp.

◆ hashAssumeValid

uint256 hashAssumeValid

Block hash whose ancestors we will assume to have valid scripts without checking them.

Definition at line 129 of file validation.cpp.

◆ MAX_SCRIPTCHECK_THREADS

const int MAX_SCRIPTCHECK_THREADS = 15
static

Maximum number of dedicated script-checking threads allowed.

Definition at line 66 of file validation.h.

◆ MIN_BLOCKS_TO_KEEP

const unsigned int MIN_BLOCKS_TO_KEEP = 288
static

Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ::ChainActive().Tip() will not be pruned.

Definition at line 79 of file validation.h.

◆ MIN_DISK_SPACE_FOR_BLOCK_FILES

const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024
static

Definition at line 90 of file validation.h.

◆ minRelayTxFee

CFeeRate minRelayTxFee

A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation)

Definition at line 132 of file validation.cpp.

◆ nMaxTipAge

int64_t nMaxTipAge

If the tip is older than this (in seconds), the node is considered to be in initial block download.

Definition at line 127 of file validation.cpp.

◆ nMinimumChainWork

arith_uint256 nMinimumChainWork

Minimum work we will assume exists on some valid chain.

Definition at line 130 of file validation.cpp.

◆ pindexBestHeader

CBlockIndex* pindexBestHeader

Best header we've seen so far (used for getheaders queries' starting points).

Definition at line 119 of file validation.cpp.