Bitcoin Core  0.21.1
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
Classes | Macros | Functions | Variables
validation.cpp File Reference
#include <validation.h>
#include <arith_uint256.h>
#include <chain.h>
#include <chainparams.h>
#include <checkqueue.h>
#include <consensus/consensus.h>
#include <consensus/merkle.h>
#include <consensus/tx_check.h>
#include <consensus/tx_verify.h>
#include <consensus/validation.h>
#include <cuckoocache.h>
#include <flatfile.h>
#include <hash.h>
#include <index/txindex.h>
#include <logging.h>
#include <logging/timer.h>
#include <node/ui_interface.h>
#include <optional.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <pow.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <random.h>
#include <reverse_iterator.h>
#include <script/script.h>
#include <script/sigcache.h>
#include <shutdown.h>
#include <signet.h>
#include <timedata.h>
#include <tinyformat.h>
#include <txdb.h>
#include <txmempool.h>
#include <uint256.h>
#include <undo.h>
#include <util/check.h>
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <util/translation.h>
#include <validationinterface.h>
#include <warnings.h>
#include <string>
#include <boost/algorithm/string/replace.hpp>
Include dependency graph for validation.cpp:

Go to the source code of this file.

Classes

class  WarningBitsConditionChecker
 Threshold condition checker that triggers when unknown versionbits are seen on the network. More...
 
struct  PerBlockConnectTrace
 
class  ConnectTrace
 Used to track blocks whose transactions were applied to the UTXO state as a part of a single ActivateBestChainStep call. More...
 

Macros

#define MICRO   0.000001
 
#define MILLI   0.001
 

Functions

CChainStateChainstateActive ()
 Please prefer the identical ChainstateManager::ActiveChainstate. More...
 
CChainChainActive ()
 Please prefer the identical ChainstateManager::ActiveChain. More...
 
std::atomic_bool fImporting (false)
 
std::atomic_bool fReindex (false)
 
CBlockIndexLookupBlockIndex (const uint256 &hash)
 
CBlockIndexFindForkInGlobalIndex (const CChain &chain, const CBlockLocator &locator)
 Find the last common block between the parameter chain and a locator. More...
 
bool CheckInputScripts (const CTransaction &tx, TxValidationState &state, const CCoinsViewCache &inputs, unsigned int flags, bool cacheSigStore, bool cacheFullScriptStore, PrecomputedTransactionData &txdata, std::vector< CScriptCheck > *pvChecks) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Check whether all of this transaction's input scripts succeed. More...
 
static FILE * OpenUndoFile (const FlatFilePos &pos, bool fReadOnly)
 Open an undo file (rev?????.dat) More...
 
static FlatFileSeq BlockFileSeq ()
 
static FlatFileSeq UndoFileSeq ()
 
bool CheckFinalTx (const CTransaction &tx, int flags)
 Transaction validation functions. More...
 
bool TestLockPointValidity (const LockPoints *lp)
 Test whether the LockPoints height and time are still valid on the current chain. More...
 
bool CheckSequenceLocks (const CTxMemPool &pool, const CTransaction &tx, int flags, LockPoints *lp, bool useExistingLockPoints)
 
static unsigned int GetBlockScriptFlags (const CBlockIndex *pindex, const Consensus::Params &chainparams)
 
static void LimitMempoolSize (CTxMemPool &pool, size_t limit, std::chrono::seconds age) EXCLUSIVE_LOCKS_REQUIRED(pool.cs
 
 if (expired!=0)
 
pool TrimToSize (limit,&vNoSpendsRemaining)
 
static void UpdateMempoolForReorg (CTxMemPool &mempool, DisconnectedBlockTransactions &disconnectpool, bool fAddToMempool) EXCLUSIVE_LOCKS_REQUIRED(cs_main
 
 AssertLockHeld (mempool.cs)
 
 while (it!=disconnectpool.queuedTx.get< insertion_order >().rend())
 
disconnectpool queuedTx clear ()
 
mempool UpdateTransactionsFromBlock (vHashUpdate)
 
 LimitMempoolSize (mempool, gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE)*1000000, std::chrono::hours{gArgs.GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)})
 
static bool CheckInputsFromMempoolAndCache (const CTransaction &tx, TxValidationState &state, const CCoinsViewCache &view, const CTxMemPool &pool, unsigned int flags, PrecomputedTransactionData &txdata) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
static bool AcceptToMemoryPoolWithTime (const CChainParams &chainparams, CTxMemPool &pool, TxValidationState &state, const CTransactionRef &tx, int64_t nAcceptTime, std::list< CTransactionRef > *plTxnReplaced, bool bypass_limits, bool test_accept, CAmount *fee_out=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 (try to) add transaction to memory pool with a specified acceptance time More...
 
bool AcceptToMemoryPool (CTxMemPool &pool, TxValidationState &state, const CTransactionRef &tx, std::list< CTransactionRef > *plTxnReplaced, bool bypass_limits, bool test_accept, CAmount *fee_out)
 (try to) add transaction to memory pool plTxnReplaced will be appended to with all transactions replaced from mempool More...
 
CTransactionRef GetTransaction (const CBlockIndex *const block_index, const CTxMemPool *const mempool, const uint256 &hash, const Consensus::Params &consensusParams, uint256 &hashBlock)
 Return transaction from the block at block_index. More...
 
static bool WriteBlockToDisk (const CBlock &block, FlatFilePos &pos, const CMessageHeader::MessageStartChars &messageStart)
 
bool ReadBlockFromDisk (CBlock &block, const FlatFilePos &pos, const Consensus::Params &consensusParams)
 Functions for disk access for blocks. More...
 
bool ReadBlockFromDisk (CBlock &block, const CBlockIndex *pindex, const Consensus::Params &consensusParams)
 
bool ReadRawBlockFromDisk (std::vector< uint8_t > &block, const FlatFilePos &pos, const CMessageHeader::MessageStartChars &message_start)
 
bool ReadRawBlockFromDisk (std::vector< uint8_t > &block, const CBlockIndex *pindex, const CMessageHeader::MessageStartChars &message_start)
 
CAmount GetBlockSubsidy (int nHeight, const Consensus::Params &consensusParams)
 
static void AlertNotify (const std::string &strMessage)
 
static void CheckForkWarningConditions () EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
static void CheckForkWarningConditionsOnNewFork (CBlockIndex *pindexNewForkTip) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
static void InvalidChainFound (CBlockIndex *pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
void UpdateCoins (const CTransaction &tx, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)
 
void UpdateCoins (const CTransaction &tx, CCoinsViewCache &inputs, int nHeight)
 Apply the effects of this transaction on the UTXO set represented by view. More...
 
int GetSpendHeight (const CCoinsViewCache &inputs)
 Return the spend height, which is one more than the inputs.GetBestBlock(). More...
 
void InitScriptExecutionCache ()
 Initializes the script-execution cache. More...
 
static bool UndoWriteToDisk (const CBlockUndo &blockundo, FlatFilePos &pos, const uint256 &hashBlock, const CMessageHeader::MessageStartChars &messageStart)
 
bool UndoReadFromDisk (CBlockUndo &blockundo, const CBlockIndex *pindex)
 
static bool AbortNode (const std::string &strMessage, bilingual_str user_message=bilingual_str())
 Abort with a message. More...
 
static bool AbortNode (BlockValidationState &state, const std::string &strMessage, const bilingual_str &userMessage=bilingual_str())
 
int ApplyTxInUndo (Coin &&undo, CCoinsViewCache &view, const COutPoint &out)
 Restore the UTXO in a Coin at a given COutPoint. More...
 
static void FlushUndoFile (int block_file, bool finalize=false)
 
static void FlushBlockFile (bool fFinalize=false, bool finalize_undo=false)
 
static bool FindUndoPos (BlockValidationState &state, int nFile, FlatFilePos &pos, unsigned int nAddSize)
 
static bool WriteUndoDataForBlock (const CBlockUndo &blockundo, BlockValidationState &state, CBlockIndex *pindex, const CChainParams &chainparams)
 
void ThreadScriptCheck (int worker_num)
 Run an instance of the script checking thread. More...
 
VersionBitsCache versionbitscache GUARDED_BY (cs_main)
 
int32_t ComputeBlockVersion (const CBlockIndex *pindexPrev, const Consensus::Params &params)
 Determine what nVersion a new block should use. More...
 
static bool IsScriptWitnessEnabled (const Consensus::Params &params)
 
static void DoWarning (const bilingual_str &warning)
 
static void AppendWarning (bilingual_str &res, const bilingual_str &warn)
 Private helper function that concatenates warning messages. More...
 
static void UpdateTip (CTxMemPool &mempool, const CBlockIndex *pindexNew, const CChainParams &chainParams) EXCLUSIVE_LOCKS_REQUIRED(
 Check warning conditions and do some notifications on new chain tip set. More...
 
static SynchronizationState GetSynchronizationState (bool init)
 
static bool NotifyHeaderTip () LOCKS_EXCLUDED(cs_main)
 
static void LimitValidationInterfaceQueue () LOCKS_EXCLUDED(cs_main)
 
bool ActivateBestChain (BlockValidationState &state, const CChainParams &chainparams, std::shared_ptr< const CBlock > pblock)
 Find the best known block, and make it the tip of the block chain. More...
 
bool PreciousBlock (BlockValidationState &state, const CChainParams &params, CBlockIndex *pindex)
 Mark a block as precious and reorganize. More...
 
bool InvalidateBlock (BlockValidationState &state, const CChainParams &chainparams, CBlockIndex *pindex)
 Mark a block as invalid. More...
 
void ResetBlockFailureFlags (CBlockIndex *pindex)
 Remove invalidity status from a block and its descendants. More...
 
static bool FindBlockPos (FlatFilePos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown=false)
 
static bool CheckBlockHeader (const CBlockHeader &block, BlockValidationState &state, const Consensus::Params &consensusParams, bool fCheckPOW=true)
 
bool CheckBlock (const CBlock &block, BlockValidationState &state, const Consensus::Params &consensusParams, bool fCheckPOW, bool fCheckMerkleRoot)
 Functions for validating blocks and updating the block tree. More...
 
bool IsWitnessEnabled (const CBlockIndex *pindexPrev, const Consensus::Params &params)
 Check whether witness commitments are required for a block, and whether to enforce NULLDUMMY (BIP 147) rules. 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...
 
static CBlockIndexGetLastCheckpoint (const CCheckpointData &data) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Returns last CBlockIndex* that is a checkpoint. More...
 
static bool ContextualCheckBlockHeader (const CBlockHeader &block, BlockValidationState &state, const CChainParams &params, const CBlockIndex *pindexPrev, int64_t nAdjustedTime) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 Context-dependent validity checks. More...
 
static bool ContextualCheckBlock (const CBlock &block, BlockValidationState &state, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 NOTE: This function is not currently invoked by ConnectBlock(), so we should consider upgrade issues if we change which consensus rules are enforced in this function (eg by adding a new consensus rule). More...
 
static FlatFilePos SaveBlockToDisk (const CBlock &block, int nHeight, const CChainParams &chainparams, const FlatFilePos *dbp)
 Store block on disk. More...
 
bool TestBlockValidity (BlockValidationState &state, const CChainParams &chainparams, const CBlock &block, CBlockIndex *pindexPrev, bool fCheckPOW, bool fCheckMerkleRoot)
 Check a block is completely valid from start to finish (only works on top of our current best block) More...
 
uint64_t CalculateCurrentUsage ()
 BLOCK PRUNING CODE. More...
 
void UnlinkPrunedFiles (const std::set< int > &setFilesToPrune)
 Actually unlink the specified files. More...
 
void PruneBlockFilesManual (int nManualPruneHeight)
 Prune block files up to a given height. More...
 
FILE * OpenBlockFile (const FlatFilePos &pos, bool fReadOnly)
 Open a block file (blk?????.dat) More...
 
fs::path GetBlockPosFilename (const FlatFilePos &pos)
 Translation to a filesystem path. More...
 
static bool LoadBlockIndexDB (ChainstateManager &chainman, const CChainParams &chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
void UnloadBlockIndex (CTxMemPool *mempool, ChainstateManager &chainman)
 Unload database information. More...
 
bool LoadGenesisBlock (const CChainParams &chainparams)
 Ensures we have a genesis block in the block tree, possibly writing one to disk. More...
 
void LoadExternalBlockFile (const CChainParams &chainparams, FILE *fileIn, FlatFilePos *dbp)
 Import blocks from an external file. More...
 
CBlockFileInfoGetBlockFileInfo (size_t n)
 Get block file info entry for one block file. More...
 
ThresholdState VersionBitsTipState (const Consensus::Params &params, Consensus::DeploymentPos pos)
 Get the BIP9 state for a given deployment at the current tip. More...
 
BIP9Stats VersionBitsTipStatistics (const Consensus::Params &params, Consensus::DeploymentPos pos)
 Get the numerical statistics for the BIP9 state for a given deployment at the current tip. More...
 
int VersionBitsTipStateSinceHeight (const Consensus::Params &params, Consensus::DeploymentPos pos)
 Get the block height at which the BIP9 deployment switched into the state for the block building on the current tip. More...
 
bool LoadMempool (CTxMemPool &pool)
 Load the mempool from disk. More...
 
bool DumpMempool (const CTxMemPool &pool)
 Dump the mempool to disk. More...
 
double GuessVerificationProgress (const ChainTxData &data, const CBlockIndex *pindex)
 Guess how far we are in the verification process at the given block index require cs_main if pindex has not been validated yet (because nChainTx might be unset) More...
 

Variables

static const unsigned int EXTRA_DESCENDANT_TX_SIZE_LIMIT = 10000
 An extra transaction can be added to a package, as long as it only has one ancestor and is no larger than this. More...
 
static const unsigned int MAX_DISCONNECTED_TX_POOL_SIZE = 20000
 Maximum kilobytes for transactions to store for processing during reorg. More...
 
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
 The pre-allocation chunk size for blk?????.dat files (since 0.8) More...
 
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
 The pre-allocation chunk size for rev?????.dat files (since 0.8) More...
 
static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL {1}
 Time to wait between writing blocks/block index to disk. More...
 
static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL {24}
 Time to wait between flushing chainstate to disk. More...
 
static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE {3}
 Maximum age of our tip for us to be considered current for fee estimation. More...
 
const std::vector< std::string > CHECKLEVEL_DOC
 Documentation for argument 'checklevel'. More...
 
ChainstateManager g_chainman
 
RecursiveMutex cs_main
 Mutex to guard access to validation specific variables, such as reading or changing the chainstate. More...
 
CBlockIndexpindexBestHeader = nullptr
 Best header we've seen so far (used for getheaders queries' starting points). More...
 
Mutex g_best_block_mutex
 
std::condition_variable g_best_block_cv
 
uint256 g_best_block
 
bool g_parallel_script_checks {false}
 Whether there are dedicated script-checking threads running. More...
 
bool fHavePruned = false
 Pruning-related variables and constants. More...
 
bool fPruneMode = false
 True if we're running in -prune mode. More...
 
bool fRequireStandard = true
 
bool fCheckBlockIndex = false
 
bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED
 
uint64_t nPruneTarget = 0
 Number of MiB of block files that we're trying to stay below. More...
 
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE
 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...
 
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE)
 A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) More...
 
CBlockPolicyEstimator feeEstimator
 
std::unique_ptr< CBlockTreeDBpblocktree
 Global variable that points to the active block tree (protected by cs_main) More...
 
std::vector< COutPointvNoSpendsRemaining
 
static for(const COutPoint
&removed:vNoSpendsRemaining)
bool 
IsCurrentForFeeEstimation () EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
static void mempool cs
 
std::vector< uint256vHashUpdate
 
auto it = disconnectpool.queuedTx.get<insertion_order>().rbegin()
 
static CBlockIndexpindexBestForkTip = nullptr
 
static CBlockIndexpindexBestForkBase = nullptr
 
static CuckooCache::cache
< uint256,
SignatureCacheHasher
g_scriptExecutionCache
 
static CSHA256 g_scriptExecutionCacheHasher
 
static CCheckQueue< CScriptCheckscriptcheckqueue (128)
 
static int64_t nTimeCheck = 0
 
static int64_t nTimeForks = 0
 
static int64_t nTimeVerify = 0
 
static int64_t nTimeConnect = 0
 
static int64_t nTimeIndex = 0
 
static int64_t nTimeCallbacks = 0
 
static int64_t nTimeTotal = 0
 
static int64_t nBlocksTotal = 0
 
static int64_t nTimeReadFromDisk = 0
 
static int64_t nTimeConnectTotal = 0
 
static int64_t nTimeFlush = 0
 
static int64_t nTimeChainState = 0
 
static int64_t nTimePostConnect = 0
 
static const uint64_t MEMPOOL_DUMP_VERSION = 1
 

Macro Definition Documentation

#define MICRO   0.000001

Definition at line 56 of file validation.cpp.

#define MILLI   0.001

Definition at line 57 of file validation.cpp.

Function Documentation

static bool AbortNode ( const std::string &  strMessage,
bilingual_str  user_message = bilingual_str() 
)
static

Abort with a message.

Definition at line 1660 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1672 of file validation.cpp.

Here is the call graph for this function:

bool AcceptToMemoryPool ( CTxMemPool pool,
TxValidationState state,
const CTransactionRef tx,
std::list< CTransactionRef > *  plTxnReplaced,
bool  bypass_limits,
bool  test_accept = false,
CAmount fee_out = nullptr 
)

(try to) add transaction to memory pool plTxnReplaced will be appended to with all transactions replaced from mempool

Parameters
[out]fee_outoptional argument to return tx fee to the caller

Definition at line 1084 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool AcceptToMemoryPoolWithTime ( const CChainParams chainparams,
CTxMemPool pool,
TxValidationState state,
const CTransactionRef tx,
int64_t  nAcceptTime,
std::list< CTransactionRef > *  plTxnReplaced,
bool  bypass_limits,
bool  test_accept,
CAmount fee_out = nullptr 
)
static

(try to) add transaction to memory pool with a specified acceptance time

Definition at line 1062 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ActivateBestChain ( BlockValidationState state,
const CChainParams chainparams,
std::shared_ptr< const CBlock pblock = std::shared_ptr< const CBlock >() 
)

Find the best known block, and make it the tip of the block chain.

May not be called with cs_main held. May not be called in a validationinterface callback.

Definition at line 2968 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void AlertNotify ( const std::string &  strMessage)
static

Definition at line 1317 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void AppendWarning ( bilingual_str res,
const bilingual_str warn 
)
static

Private helper function that concatenates warning messages.

Definition at line 2440 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ApplyTxInUndo ( Coin &&  undo,
CCoinsViewCache view,
const COutPoint out 
)

Restore the UTXO in a Coin at a given COutPoint.

Parameters
undoThe Coin to be restored.
viewThe coins view to which to apply the changes.
outThe out point that corresponds to the tx input.
Returns
A DisconnectResult as an int

Definition at line 1685 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

AssertLockHeld ( mempool.  cs)
static FlatFileSeq BlockFileSeq ( )
static

Definition at line 4057 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t CalculateCurrentUsage ( )

BLOCK PRUNING CODE.

Calculate the amount of disk space the block & undo files currently use.

Definition at line 3908 of file validation.cpp.

Here is the caller graph for this function:

CChain& ChainActive ( )

Please prefer the identical ChainstateManager::ActiveChain.

Definition at line 113 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

mempool removeForReorg & ChainstateActive ( )

Please prefer the identical ChainstateManager::ActiveChainstate.

Definition at line 106 of file validation.cpp.

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

static bool CheckBlockHeader ( const CBlockHeader block,
BlockValidationState state,
const Consensus::Params consensusParams,
bool  fCheckPOW = true 
)
static

Definition at line 3341 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CheckFinalTx ( 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 206 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void CheckForkWarningConditions ( )
static

Definition at line 1337 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void CheckForkWarningConditionsOnNewFork ( CBlockIndex pindexNewForkTip)
static

Definition at line 1378 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CheckInputScripts ( const CTransaction tx,
TxValidationState state,
const CCoinsViewCache inputs,
unsigned int  flags,
bool  cacheSigStore,
bool  cacheFullScriptStore,
PrecomputedTransactionData txdata,
std::vector< CScriptCheck > *  pvChecks 
)

Check whether all of this transaction's input scripts succeed.

This involves ECDSA signature checks so can be computationally intensive. This function should only be called after the cheap sanity checks in CheckTxInputs passed.

If pvChecks is not nullptr, script checks are pushed onto it instead of being performed inline. Any script checks which are not necessary (eg due to script execution cache hits) are, obviously, not pushed onto pvChecks/run.

Setting cacheSigStore/cacheFullScriptStore to false will remove elements from the corresponding cache which are matched. This is useful for checking blocks where we will likely never need the cache entry again.

Note that we may set state.reason to NOT_STANDARD for extra soft-fork flags in flags, block-checking callers should probably reset it to CONSENSUS in such cases.

Non-static (and re-declared) in src/test/txvalidationcache_tests.cpp

Definition at line 1516 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool CheckInputsFromMempoolAndCache ( const CTransaction tx,
TxValidationState state,
const CCoinsViewCache view,
const CTxMemPool pool,
unsigned int  flags,
PrecomputedTransactionData txdata 
)
static

Definition at line 412 of file validation.cpp.

Here is the call graph for this function:

bool CheckSequenceLocks ( const CTxMemPool pool,
const CTransaction tx,
int  flags,
LockPoints lp,
bool  useExistingLockPoints 
)

Definition at line 256 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

disconnectpool queuedTx clear ( )

Here is the caller graph for this function:

int32_t ComputeBlockVersion ( const CBlockIndex pindexPrev,
const Consensus::Params params 
)

Determine what nVersion a new block should use.

Definition at line 1830 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool ContextualCheckBlock ( const CBlock block,
BlockValidationState state,
const Consensus::Params consensusParams,
const CBlockIndex pindexPrev 
)
static

NOTE: This function is not currently invoked by ConnectBlock(), so we should consider upgrade issues if we change which consensus rules are enforced in this function (eg by adding a new consensus rule).

See comment in ConnectBlock(). Note that -reindex-chainstate skips the validation that happens here!

Definition at line 3543 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool ContextualCheckBlockHeader ( const CBlockHeader block,
BlockValidationState state,
const CChainParams params,
const CBlockIndex pindexPrev,
int64_t  nAdjustedTime 
)
static

Context-dependent validity checks.

By "context", we mean only the previous block headers, but not the UTXO set; UTXO-related validity checks are done in ConnectBlock(). NOTE: This function is not currently invoked by ConnectBlock(), so we should consider upgrade issues if we change which consensus rules are enforced in this function (eg by adding a new consensus rule). See comment in ConnectBlock(). Note that -reindex-chainstate skips the validation that happens here!

Definition at line 3496 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void DoWarning ( const bilingual_str warning)
static

Definition at line 2429 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool DumpMempool ( const CTxMemPool pool)

Dump the mempool to disk.

Definition at line 5141 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::atomic_bool fImporting ( false  )

Here is the caller graph for this function:

static bool FindBlockPos ( FlatFilePos pos,
unsigned int  nAddSize,
unsigned int  nHeight,
uint64_t  nTime,
bool  fKnown = false 
)
static

Definition at line 3265 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CBlockIndex* FindForkInGlobalIndex ( const CChain chain,
const CBlockLocator locator 
)

Find the last common block between the parameter chain and a locator.

Definition at line 180 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool FindUndoPos ( BlockValidationState state,
int  nFile,
FlatFilePos pos,
unsigned int  nAddSize 
)
static

Definition at line 3319 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void FlushBlockFile ( bool  fFinalize = false,
bool  finalize_undo = false 
)
static

Definition at line 1780 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void FlushUndoFile ( int  block_file,
bool  finalize = false 
)
static

Definition at line 1772 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::atomic_bool fReindex ( false  )

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

CBlockFileInfo* GetBlockFileInfo ( size_t  n)

Get block file info entry for one block file.

Definition at line 5021 of file validation.cpp.

fs::path GetBlockPosFilename ( const FlatFilePos pos)

Translation to a filesystem path.

Definition at line 4076 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned int GetBlockScriptFlags ( const CBlockIndex pindex,
const Consensus::Params chainparams 
)
static

Definition at line 1881 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1236 of file validation.cpp.

Here is the caller graph for this function:

static CBlockIndex* GetLastCheckpoint ( const CCheckpointData data)
static

Returns last CBlockIndex* that is a checkpoint.

Definition at line 3472 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int GetSpendHeight ( const CCoinsViewCache inputs)

Return the spend height, which is one more than the inputs.GetBestBlock().

While checking, GetBestBlock() refers to the parent block. (protected by cs_main) This is also true for mempool checks.

Definition at line 1470 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static SynchronizationState GetSynchronizationState ( bool  init)
static

Definition at line 2833 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CTransactionRef GetTransaction ( const CBlockIndex *const  block_index,
const CTxMemPool *const  mempool,
const uint256 hash,
const Consensus::Params consensusParams,
uint256 hashBlock 
)

Return transaction from the block at block_index.

If block_index is not provided, fall back to mempool. If mempool is not provided or the tx couldn't be found in mempool, fall back to g_txindex.

Parameters
[in]block_indexThe block to read from disk, or nullptr
[in]mempoolIf block_index is not provided, look in the mempool, if provided
[in]hashThe txid
[in]consensusParamsThe params
[out]hashBlockThe hash of block_index, if the tx was found via block_index
Returns
The tx if found, otherwise nullptr

Definition at line 1092 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double GuessVerificationProgress ( const ChainTxData data,
const CBlockIndex pindex 
)

Guess how far we are in the verification process at the given block index require cs_main if pindex has not been validated yet (because nChainTx might be unset)

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

Definition at line 5202 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

if ( expired!  = 0)

Definition at line 335 of file validation.cpp.

Here is the caller graph for this function:

void InitScriptExecutionCache ( )

Initializes the script-execution cache.

Definition at line 1481 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool InvalidateBlock ( BlockValidationState state,
const CChainParams chainparams,
CBlockIndex pindex 
)

Mark a block as invalid.

Definition at line 3140 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void InvalidChainFound ( CBlockIndex pindexNew)
static

Definition at line 1412 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool IsScriptWitnessEnabled ( const Consensus::Params params)
static

Definition at line 1876 of file validation.cpp.

Here is the caller graph for this function:

bool IsWitnessEnabled ( const CBlockIndex pindexPrev,
const Consensus::Params params 
)

Check whether witness commitments are required for a block, and whether to enforce NULLDUMMY (BIP 147) rules.

Note that transaction witness validation rules are always enforced when P2SH is enforced.

Definition at line 3424 of file validation.cpp.

Here is the caller graph for this function:

static void LimitMempoolSize ( CTxMemPool pool,
size_t  limit,
std::chrono::seconds  age 
)
static
LimitMempoolSize ( mempool  ,
gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE)*  1000000,
std::chrono::hours{gArgs.GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)}   
)
static void LimitValidationInterfaceQueue ( )
static

Definition at line 2862 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool LoadBlockIndexDB ( ChainstateManager chainman,
const CChainParams chainparams 
)
static

Definition at line 4167 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadExternalBlockFile ( const CChainParams chainparams,
FILE *  fileIn,
FlatFilePos dbp 
)

Import blocks from an external file.

Definition at line 4672 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool LoadGenesisBlock ( const CChainParams chainparams)

Ensures we have a genesis block in the block tree, possibly writing one to disk.

Definition at line 4667 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool LoadMempool ( CTxMemPool pool)

Load the mempool from disk.

Definition at line 5048 of file validation.cpp.

Here is the call graph for this function:

CBlockIndex* LookupBlockIndex ( const uint256 hash)

Definition at line 173 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool NotifyHeaderTip ( )
static

Definition at line 2840 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

FILE* OpenBlockFile ( const FlatFilePos pos,
bool  fReadOnly 
)

Open a block file (blk?????.dat)

Definition at line 4067 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static FILE * OpenUndoFile ( const FlatFilePos pos,
bool  fReadOnly = false 
)
static

Open an undo file (rev?????.dat)

Definition at line 4072 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool PreciousBlock ( BlockValidationState state,
const CChainParams params,
CBlockIndex pindex 
)

Mark a block as precious and reorganize.

May not be called in a validationinterface callback.

Definition at line 3000 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PruneBlockFilesManual ( int  nManualPruneHeight)

Prune block files up to a given height.

Definition at line 3988 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ReadBlockFromDisk ( CBlock block,
const FlatFilePos pos,
const Consensus::Params consensusParams 
)

Functions for disk access for blocks.

Definition at line 1145 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ReadBlockFromDisk ( CBlock block,
const CBlockIndex pindex,
const Consensus::Params consensusParams 
)

Definition at line 1174 of file validation.cpp.

Here is the call graph for this function:

bool ReadRawBlockFromDisk ( std::vector< uint8_t > &  block,
const FlatFilePos pos,
const CMessageHeader::MessageStartChars message_start 
)

Definition at line 1190 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ReadRawBlockFromDisk ( std::vector< uint8_t > &  block,
const CBlockIndex pindex,
const CMessageHeader::MessageStartChars message_start 
)

Definition at line 1225 of file validation.cpp.

Here is the call graph for this function:

void ResetBlockFailureFlags ( CBlockIndex pindex)

Remove invalidity status from a block and its descendants.

Definition at line 3178 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static FlatFilePos SaveBlockToDisk ( const CBlock block,
int  nHeight,
const CChainParams chainparams,
const FlatFilePos dbp 
)
static

Store block on disk.

If dbp is non-nullptr, the file is known to already reside on disk

Definition at line 3742 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 3878 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool TestLockPointValidity ( const LockPoints lp)

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

Definition at line 238 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ThreadScriptCheck ( int  worker_num)

Run an instance of the script checking thread.

Definition at line 1823 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

pool TrimToSize ( limit  ,
vNoSpendsRemaining 
)
static FlatFileSeq UndoFileSeq ( )
static

Definition at line 4062 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UndoReadFromDisk ( CBlockUndo blockundo,
const CBlockIndex pindex 
)

Definition at line 1628 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool UndoWriteToDisk ( const CBlockUndo blockundo,
FlatFilePos pos,
const uint256 hashBlock,
const CMessageHeader::MessageStartChars messageStart 
)
static

Definition at line 1601 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void UnlinkPrunedFiles ( const std::set< int > &  setFilesToPrune)

Actually unlink the specified files.

Definition at line 3954 of file validation.cpp.

Here is the call graph for this function:

void UnloadBlockIndex ( CTxMemPool mempool,
ChainstateManager chainman 
)

Unload database information.

Definition at line 4601 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1443 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

static void UpdateMempoolForReorg ( CTxMemPool mempool,
DisconnectedBlockTransactions disconnectpool,
bool  fAddToMempool 
)
static

Here is the caller graph for this function:

static void UpdateTip ( CTxMemPool mempool,
const CBlockIndex pindexNew,
const CChainParams chainParams 
)
static

Check warning conditions and do some notifications on new chain tip set.

Definition at line 2447 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

mempool UpdateTransactionsFromBlock ( vHashUpdate  )
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 3430 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ThresholdState VersionBitsTipState ( const Consensus::Params params,
Consensus::DeploymentPos  pos 
)

Get the BIP9 state for a given deployment at the current tip.

Definition at line 5028 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int VersionBitsTipStateSinceHeight ( const Consensus::Params params,
Consensus::DeploymentPos  pos 
)

Get the block height at which the BIP9 deployment switched into the state for the block building on the current tip.

Definition at line 5040 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

BIP9Stats VersionBitsTipStatistics ( const Consensus::Params params,
Consensus::DeploymentPos  pos 
)

Get the numerical statistics for the BIP9 state for a given deployment at the current tip.

Definition at line 5034 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

while ( it!  = disconnectpool.queuedTx.get<insertion_order>().rend())

Definition at line 382 of file validation.cpp.

Here is the call graph for this function:

static bool WriteBlockToDisk ( const CBlock block,
FlatFilePos pos,
const CMessageHeader::MessageStartChars messageStart 
)
static

Definition at line 1124 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool WriteUndoDataForBlock ( const CBlockUndo blockundo,
BlockValidationState state,
CBlockIndex pindex,
const CChainParams chainparams 
)
static

Definition at line 1794 of file validation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
static

The pre-allocation chunk size for blk?????.dat files (since 0.8)

Definition at line 68 of file validation.cpp.

const std::vector<std::string> CHECKLEVEL_DOC
Initial value:
{
"level 0 reads the blocks from disk",
"level 1 verifies block validity",
"level 2 verifies undo data",
"level 3 checks disconnection of tip blocks",
"level 4 tries to reconnect the blocks",
"each level includes the checks of the previous levels",
}

Documentation for argument 'checklevel'.

Definition at line 77 of file validation.cpp.

void mempool cs
Initial value:
{
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate...
Definition: validation.cpp:129
AssertLockHeld(mempool.cs)

Definition at line 371 of file validation.cpp.

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

constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL {24}
static

Time to wait between flushing chainstate to disk.

Definition at line 74 of file validation.cpp.

constexpr std::chrono::hours DATABASE_WRITE_INTERVAL {1}
static

Time to wait between writing blocks/block index to disk.

Definition at line 72 of file validation.cpp.

const unsigned int EXTRA_DESCENDANT_TX_SIZE_LIMIT = 10000
static

An extra transaction can be added to a package, as long as it only has one ancestor and is no larger than this.

Not really any reason to make this configurable as it doesn't materially change DoS parameters.

Definition at line 64 of file validation.cpp.

bool fCheckBlockIndex = false

Definition at line 141 of file validation.cpp.

bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED

Definition at line 142 of file validation.cpp.

CBlockPolicyEstimator feeEstimator

Definition at line 151 of file validation.cpp.

bool fHavePruned = false

Pruning-related variables and constants.

True if any block files have ever been pruned.

Definition at line 138 of file validation.cpp.

bool fPruneMode = false

True if we're running in -prune mode.

Definition at line 139 of file validation.cpp.

bool fRequireStandard = true

Definition at line 140 of file validation.cpp.

uint256 g_best_block

Definition at line 134 of file validation.cpp.

std::condition_variable g_best_block_cv

Definition at line 133 of file validation.cpp.

Mutex g_best_block_mutex

Definition at line 132 of file validation.cpp.

ChainstateManager g_chainman

Definition at line 104 of file validation.cpp.

bool g_parallel_script_checks {false}

Whether there are dedicated script-checking threads running.

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

Definition at line 135 of file validation.cpp.

CuckooCache::cache<uint256, SignatureCacheHasher> g_scriptExecutionCache
static

Definition at line 1478 of file validation.cpp.

CSHA256 g_scriptExecutionCacheHasher
static

Definition at line 1479 of file validation.cpp.

uint256 hashAssumeValid

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

Definition at line 146 of file validation.cpp.

for (const COutPoint& removed : vNoSpendsRemaining) bool IsCurrentForFeeEstimation() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
static

Definition at line 345 of file validation.cpp.

auto it = disconnectpool.queuedTx.get<insertion_order>().rbegin()

Definition at line 381 of file validation.cpp.

const unsigned int MAX_DISCONNECTED_TX_POOL_SIZE = 20000
static

Maximum kilobytes for transactions to store for processing during reorg.

Definition at line 66 of file validation.cpp.

constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE {3}
static

Maximum age of our tip for us to be considered current for fee estimation.

Definition at line 76 of file validation.cpp.

const uint64_t MEMPOOL_DUMP_VERSION = 1
static

Definition at line 5046 of file validation.cpp.

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

Definition at line 149 of file validation.cpp.

int64_t nBlocksTotal = 0
static

Definition at line 1941 of file validation.cpp.

int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE

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

Definition at line 144 of file validation.cpp.

arith_uint256 nMinimumChainWork

Minimum work we will assume exists on some valid chain.

Definition at line 147 of file validation.cpp.

uint64_t nPruneTarget = 0

Number of MiB of block files that we're trying to stay below.

Definition at line 143 of file validation.cpp.

int64_t nTimeCallbacks = 0
static

Definition at line 1939 of file validation.cpp.

int64_t nTimeChainState = 0
static

Definition at line 2559 of file validation.cpp.

int64_t nTimeCheck = 0
static

Definition at line 1934 of file validation.cpp.

int64_t nTimeConnect = 0
static

Definition at line 1937 of file validation.cpp.

int64_t nTimeConnectTotal = 0
static

Definition at line 2557 of file validation.cpp.

int64_t nTimeFlush = 0
static

Definition at line 2558 of file validation.cpp.

int64_t nTimeForks = 0
static

Definition at line 1935 of file validation.cpp.

int64_t nTimeIndex = 0
static

Definition at line 1938 of file validation.cpp.

int64_t nTimePostConnect = 0
static

Definition at line 2560 of file validation.cpp.

int64_t nTimeReadFromDisk = 0
static

Definition at line 2556 of file validation.cpp.

int64_t nTimeTotal = 0
static

Definition at line 1940 of file validation.cpp.

int64_t nTimeVerify = 0
static

Definition at line 1936 of file validation.cpp.

std::unique_ptr<CBlockTreeDB> pblocktree

Global variable that points to the active block tree (protected by cs_main)

Definition at line 199 of file validation.cpp.

CBlockIndex * pindexBestForkBase = nullptr
static

Definition at line 1315 of file validation.cpp.

CBlockIndex* pindexBestForkTip = nullptr
static

Definition at line 1315 of file validation.cpp.

CBlockIndex* pindexBestHeader = nullptr

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

Definition at line 131 of file validation.cpp.

CCheckQueue<CScriptCheck> scriptcheckqueue(128)
static
const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
static

The pre-allocation chunk size for rev?????.dat files (since 0.8)

Definition at line 70 of file validation.cpp.

std::vector<uint256> vHashUpdate

Definition at line 374 of file validation.cpp.

std::vector<COutPoint> vNoSpendsRemaining

Definition at line 339 of file validation.cpp.