Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show All 28 Lines | |||||
#include <atomic> | #include <atomic> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <map> | #include <map> | ||||
#include <memory> | #include <memory> | ||||
#include <set> | #include <set> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
class BlockValidationState; | |||||
class CBlockIndex; | class CBlockIndex; | ||||
class CBlockTreeDB; | class CBlockTreeDB; | ||||
class CBlockUndo; | class CBlockUndo; | ||||
class CChainParams; | class CChainParams; | ||||
class CChain; | class CChain; | ||||
class CCoinsViewDB; | class CCoinsViewDB; | ||||
class CConnman; | class CConnman; | ||||
class CInv; | class CInv; | ||||
class Config; | class Config; | ||||
class CScriptCheck; | class CScriptCheck; | ||||
class CTxMemPool; | class CTxMemPool; | ||||
class CTxUndo; | class CTxUndo; | ||||
class CValidationState; | |||||
class DisconnectedBlockTransactions; | class DisconnectedBlockTransactions; | ||||
class TxValidationState; | |||||
struct ChainTxData; | struct ChainTxData; | ||||
struct FlatFilePos; | struct FlatFilePos; | ||||
struct PrecomputedTransactionData; | struct PrecomputedTransactionData; | ||||
struct LockPoints; | struct LockPoints; | ||||
namespace Consensus { | namespace Consensus { | ||||
struct Params; | struct Params; | ||||
▲ Show 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | |||||
* May not be called in a validationinterface callback. | * May not be called in a validationinterface callback. | ||||
* | * | ||||
* @param[in] config The config. | * @param[in] config The config. | ||||
* @param[in] block The block headers themselves. | * @param[in] block The block headers themselves. | ||||
* @param[out] state This may be set to an Error state if any error | * @param[out] state This may be set to an Error state if any error | ||||
* occurred processing them. | * occurred processing them. | ||||
* @param[out] ppindex If set, the pointer will be set to point to the | * @param[out] ppindex If set, the pointer will be set to point to the | ||||
* last new block index object for the given headers. | * last new block index object for the given headers. | ||||
* @param[out] first_invalid First header that fails validation, if one exists. | |||||
* @return True if block headers were accepted as valid. | * @return True if block headers were accepted as valid. | ||||
*/ | */ | ||||
bool ProcessNewBlockHeaders(const Config &config, | bool ProcessNewBlockHeaders(const Config &config, | ||||
const std::vector<CBlockHeader> &block, | const std::vector<CBlockHeader> &block, | ||||
CValidationState &state, | BlockValidationState &state, | ||||
const CBlockIndex **ppindex = nullptr, | const CBlockIndex **ppindex = nullptr) | ||||
CBlockHeader *first_invalid = nullptr) | |||||
LOCKS_EXCLUDED(cs_main); | LOCKS_EXCLUDED(cs_main); | ||||
/** | /** | ||||
* Open a block file (blk?????.dat). | * Open a block file (blk?????.dat). | ||||
*/ | */ | ||||
FILE *OpenBlockFile(const FlatFilePos &pos, bool fReadOnly = false); | FILE *OpenBlockFile(const FlatFilePos &pos, bool fReadOnly = false); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Find the best known block, and make it the tip of the block chain | * 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 | * May not be called with cs_main held. May not be called in a | ||||
* validationinterface callback. | * validationinterface callback. | ||||
*/ | */ | ||||
bool ActivateBestChain( | bool ActivateBestChain( | ||||
const Config &config, CValidationState &state, | const Config &config, BlockValidationState &state, | ||||
std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | ||||
Amount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams); | Amount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams); | ||||
/** | /** | ||||
* Guess verification progress (as a fraction between 0.0=genesis and | * Guess verification progress (as a fraction between 0.0=genesis and | ||||
* 1.0=current tip). | * 1.0=current tip). | ||||
*/ | */ | ||||
double GuessVerificationProgress(const ChainTxData &data, | double GuessVerificationProgress(const ChainTxData &data, | ||||
Show All 16 Lines | |||||
/** Prune block files up to a given height */ | /** Prune block files up to a given height */ | ||||
void PruneBlockFilesManual(int nManualPruneHeight); | void PruneBlockFilesManual(int nManualPruneHeight); | ||||
/** | /** | ||||
* (try to) add transaction to memory pool | * (try to) add transaction to memory pool | ||||
*/ | */ | ||||
bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | ||||
CValidationState &state, const CTransactionRef &tx, | TxValidationState &state, const CTransactionRef &tx, | ||||
bool *pfMissingInputs, bool bypass_limits, | bool bypass_limits, const Amount nAbsurdFee, | ||||
const Amount nAbsurdFee, bool test_accept = false) | bool test_accept = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Simple class for regulating resource usage during CheckInputs (and | * Simple class for regulating resource usage during CheckInputs (and | ||||
* CScriptCheck), atomic so as to be compatible with parallel validation. | * CScriptCheck), atomic so as to be compatible with parallel validation. | ||||
*/ | */ | ||||
class CheckInputsLimiter { | class CheckInputsLimiter { | ||||
protected: | protected: | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
* pLimitSigChecks can be passed to limit the sigchecks count either in parallel | * pLimitSigChecks can be passed to limit the sigchecks count either in parallel | ||||
* or serial validation. With pvChecks null (serial validation), breaking the | * or serial validation. With pvChecks null (serial validation), breaking the | ||||
* pLimitSigChecks limit will abort evaluation early and return false. With | * pLimitSigChecks limit will abort evaluation early and return false. With | ||||
* pvChecks not-null (parallel validation): the cached nSigChecks may itself | * pvChecks not-null (parallel validation): the cached nSigChecks may itself | ||||
* break the limit in which case false is returned, OR, each entry in the | * break the limit in which case false is returned, OR, each entry in the | ||||
* returned pvChecks must be executed exactly once in order to probe the limit | * returned pvChecks must be executed exactly once in order to probe the limit | ||||
* accurately. | * accurately. | ||||
*/ | */ | ||||
bool CheckInputs(const CTransaction &tx, CValidationState &state, | bool CheckInputs(const CTransaction &tx, TxValidationState &state, | ||||
const CCoinsViewCache &view, bool fScriptChecks, | const CCoinsViewCache &view, bool fScriptChecks, | ||||
const uint32_t flags, bool sigCacheStore, | const uint32_t flags, bool sigCacheStore, | ||||
bool scriptCacheStore, | bool scriptCacheStore, | ||||
const PrecomputedTransactionData &txdata, int &nSigChecksOut, | const PrecomputedTransactionData &txdata, int &nSigChecksOut, | ||||
TxSigCheckLimiter &txLimitSigChecks, | TxSigCheckLimiter &txLimitSigChecks, | ||||
CheckInputsLimiter *pBlockLimitSigChecks, | CheckInputsLimiter *pBlockLimitSigChecks, | ||||
std::vector<CScriptCheck> *pvChecks) | std::vector<CScriptCheck> *pvChecks) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Handy shortcut to full fledged CheckInputs call. | * Handy shortcut to full fledged CheckInputs call. | ||||
*/ | */ | ||||
static inline bool | static inline bool | ||||
CheckInputs(const CTransaction &tx, CValidationState &state, | CheckInputs(const CTransaction &tx, TxValidationState &state, | ||||
const CCoinsViewCache &view, bool fScriptChecks, | const CCoinsViewCache &view, bool fScriptChecks, | ||||
const uint32_t flags, bool sigCacheStore, bool scriptCacheStore, | const uint32_t flags, bool sigCacheStore, bool scriptCacheStore, | ||||
const PrecomputedTransactionData &txdata, int &nSigChecksOut) | const PrecomputedTransactionData &txdata, int &nSigChecksOut) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | ||||
TxSigCheckLimiter nSigChecksTxLimiter; | TxSigCheckLimiter nSigChecksTxLimiter; | ||||
return CheckInputs(tx, state, view, fScriptChecks, flags, sigCacheStore, | return CheckInputs(tx, state, view, fScriptChecks, flags, sigCacheStore, | ||||
scriptCacheStore, txdata, nSigChecksOut, | scriptCacheStore, txdata, nSigChecksOut, | ||||
nSigChecksTxLimiter, nullptr, nullptr); | nSigChecksTxLimiter, nullptr, nullptr); | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | |||||
/** Functions for validating blocks and updating the block tree */ | /** Functions for validating blocks and updating the block tree */ | ||||
/** | /** | ||||
* Context-independent validity checks. | * Context-independent validity checks. | ||||
* | * | ||||
* Returns true if the provided block is valid (has valid header, | * Returns true if the provided block is valid (has valid header, | ||||
* transactions are valid, block is a valid size, etc.) | * transactions are valid, block is a valid size, etc.) | ||||
*/ | */ | ||||
bool CheckBlock(const CBlock &block, CValidationState &state, | bool CheckBlock(const CBlock &block, BlockValidationState &state, | ||||
const Consensus::Params ¶ms, | const Consensus::Params ¶ms, | ||||
BlockValidationOptions validationOptions); | BlockValidationOptions validationOptions); | ||||
/** | /** | ||||
* This is a variant of ContextualCheckTransaction which computes the contextual | * This is a variant of ContextualCheckTransaction which computes the contextual | ||||
* check for a transaction based on the chain tip. | * check for a transaction based on the chain tip. | ||||
* | * | ||||
* See consensus/consensus.h for flag definitions. | * See consensus/consensus.h for flag definitions. | ||||
*/ | */ | ||||
bool ContextualCheckTransactionForCurrentBlock(const Consensus::Params ¶ms, | bool ContextualCheckTransactionForCurrentBlock(const Consensus::Params ¶ms, | ||||
const CTransaction &tx, | const CTransaction &tx, | ||||
CValidationState &state, | TxValidationState &state, | ||||
int flags = -1); | int flags = -1); | ||||
/** | /** | ||||
* Check a block is completely valid from start to finish (only works on top of | * Check a block is completely valid from start to finish (only works on top of | ||||
* our current best block) | * our current best block) | ||||
*/ | */ | ||||
bool TestBlockValidity(CValidationState &state, const CChainParams ¶ms, | bool TestBlockValidity(BlockValidationState &state, const CChainParams ¶ms, | ||||
const CBlock &block, CBlockIndex *pindexPrev, | const CBlock &block, CBlockIndex *pindexPrev, | ||||
BlockValidationOptions validationOptions) | BlockValidationOptions validationOptions) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* RAII wrapper for VerifyDB: Verify consistency of the block and coin | * RAII wrapper for VerifyDB: Verify consistency of the block and coin | ||||
* databases. | * databases. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | public: | ||||
* The caches and indexes are flushed depending on the mode we're called | * The caches and indexes are flushed depending on the mode we're called | ||||
* with if they're too large, if it's been a while since the last write, or | * with if they're too large, if it's been a while since the last write, or | ||||
* always and in all cases if we're in prune mode and are deleting files. | * always and in all cases if we're in prune mode and are deleting files. | ||||
* | * | ||||
* If FlushStateMode::NONE is used, then FlushStateToDisk(...) won't do | * If FlushStateMode::NONE is used, then FlushStateToDisk(...) won't do | ||||
* anything besides checking if we need to prune. | * anything besides checking if we need to prune. | ||||
*/ | */ | ||||
bool FlushStateToDisk(const CChainParams &chainparams, | bool FlushStateToDisk(const CChainParams &chainparams, | ||||
CValidationState &state, FlushStateMode mode, | BlockValidationState &state, FlushStateMode mode, | ||||
int nManualPruneHeight = 0); | int nManualPruneHeight = 0); | ||||
//! Unconditionally flush all changes to disk. | //! Unconditionally flush all changes to disk. | ||||
void ForceFlushStateToDisk(); | void ForceFlushStateToDisk(); | ||||
//! Prune blockfiles from the disk if necessary and then flush chainstate | //! Prune blockfiles from the disk if necessary and then flush chainstate | ||||
//! changes if we pruned. | //! changes if we pruned. | ||||
void PruneAndFlush(); | void PruneAndFlush(); | ||||
bool ActivateBestChain( | bool ActivateBestChain( | ||||
const Config &config, CValidationState &state, | const Config &config, BlockValidationState &state, | ||||
std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | ||||
/** | /** | ||||
* If a block header hasn't already been seen, call CheckBlockHeader on it, | * If a block header hasn't already been seen, call CheckBlockHeader on it, | ||||
* ensure that it doesn't descend from an invalid block, and then add it to | * ensure that it doesn't descend from an invalid block, and then add it to | ||||
* mapBlockIndex. | * mapBlockIndex. | ||||
*/ | */ | ||||
bool AcceptBlockHeader(const Config &config, const CBlockHeader &block, | bool AcceptBlockHeader(const Config &config, const CBlockHeader &block, | ||||
CValidationState &state, CBlockIndex **ppindex) | BlockValidationState &state, CBlockIndex **ppindex) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
bool AcceptBlock(const Config &config, | bool AcceptBlock(const Config &config, | ||||
const std::shared_ptr<const CBlock> &pblock, | const std::shared_ptr<const CBlock> &pblock, | ||||
CValidationState &state, bool fRequested, | BlockValidationState &state, bool fRequested, | ||||
const FlatFilePos *dbp, bool *fNewBlock) | const FlatFilePos *dbp, bool *fNewBlock) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
// Block (dis)connection on a given view: | // Block (dis)connection on a given view: | ||||
DisconnectResult DisconnectBlock(const CBlock &block, | DisconnectResult DisconnectBlock(const CBlock &block, | ||||
const CBlockIndex *pindex, | const CBlockIndex *pindex, | ||||
CCoinsViewCache &view); | CCoinsViewCache &view); | ||||
bool ConnectBlock(const CBlock &block, CValidationState &state, | bool ConnectBlock(const CBlock &block, BlockValidationState &state, | ||||
CBlockIndex *pindex, CCoinsViewCache &view, | CBlockIndex *pindex, CCoinsViewCache &view, | ||||
const CChainParams ¶ms, | const CChainParams ¶ms, | ||||
BlockValidationOptions options, bool fJustCheck = false) | BlockValidationOptions options, bool fJustCheck = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
// Block disconnection on our pcoinsTip: | // Block disconnection on our pcoinsTip: | ||||
bool DisconnectTip(const CChainParams ¶ms, CValidationState &state, | bool DisconnectTip(const CChainParams ¶ms, BlockValidationState &state, | ||||
DisconnectedBlockTransactions *disconnectpool) | DisconnectedBlockTransactions *disconnectpool) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
// Manual block validity manipulation: | // Manual block validity manipulation: | ||||
bool PreciousBlock(const Config &config, CValidationState &state, | bool PreciousBlock(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | ||||
bool UnwindBlock(const Config &config, CValidationState &state, | bool UnwindBlock(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindex, bool invalidate); | CBlockIndex *pindex, bool invalidate); | ||||
void ResetBlockFailureFlags(CBlockIndex *pindex) | void ResetBlockFailureFlags(CBlockIndex *pindex) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
template <typename F> | template <typename F> | ||||
bool UpdateFlagsForBlock(CBlockIndex *pindexBase, CBlockIndex *pindex, F f) | bool UpdateFlagsForBlock(CBlockIndex *pindexBase, CBlockIndex *pindex, F f) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
template <typename F, typename C, typename AC> | template <typename F, typename C, typename AC> | ||||
void UpdateFlags(CBlockIndex *pindex, CBlockIndex *&pindexReset, F f, | void UpdateFlags(CBlockIndex *pindex, CBlockIndex *&pindexReset, F f, | ||||
Show All 12 Lines | public: | ||||
/** | /** | ||||
* Check whether we are doing an initial block download (synchronizing from | * Check whether we are doing an initial block download (synchronizing from | ||||
* disk or network) | * disk or network) | ||||
*/ | */ | ||||
bool IsInitialBlockDownload() const; | bool IsInitialBlockDownload() const; | ||||
private: | private: | ||||
bool ActivateBestChainStep(const Config &config, CValidationState &state, | bool ActivateBestChainStep(const Config &config, | ||||
BlockValidationState &state, | |||||
CBlockIndex *pindexMostWork, | CBlockIndex *pindexMostWork, | ||||
const std::shared_ptr<const CBlock> &pblock, | const std::shared_ptr<const CBlock> &pblock, | ||||
bool &fInvalidFound, ConnectTrace &connectTrace) | bool &fInvalidFound, ConnectTrace &connectTrace) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
bool ConnectTip(const Config &config, CValidationState &state, | bool ConnectTip(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindexNew, | CBlockIndex *pindexNew, | ||||
const std::shared_ptr<const CBlock> &pblock, | const std::shared_ptr<const CBlock> &pblock, | ||||
ConnectTrace &connectTrace, | ConnectTrace &connectTrace, | ||||
DisconnectedBlockTransactions &disconnectpool) | DisconnectedBlockTransactions &disconnectpool) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
CBlockIndex *AddToBlockIndex(const CBlockHeader &block) | CBlockIndex *AddToBlockIndex(const CBlockHeader &block) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** Create a new block index entry for a given block hash */ | /** Create a new block index entry for a given block hash */ | ||||
CBlockIndex *InsertBlockIndex(const BlockHash &hash) | CBlockIndex *InsertBlockIndex(const BlockHash &hash) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Make various assertions about the state of the block index. | * Make various assertions about the state of the block index. | ||||
* | * | ||||
* By default this only executes fully when using the Regtest chain; see: | * By default this only executes fully when using the Regtest chain; see: | ||||
* fCheckBlockIndex. | * fCheckBlockIndex. | ||||
*/ | */ | ||||
void CheckBlockIndex(const Consensus::Params &consensusParams); | void CheckBlockIndex(const Consensus::Params &consensusParams); | ||||
void InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state) | void InvalidBlockFound(CBlockIndex *pindex, | ||||
const BlockValidationState &state) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
CBlockIndex *FindMostWorkChain() EXCLUSIVE_LOCKS_REQUIRED(cs_main); | CBlockIndex *FindMostWorkChain() EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
void ReceivedBlockTransactions(const CBlock &block, CBlockIndex *pindexNew, | void ReceivedBlockTransactions(const CBlock &block, CBlockIndex *pindexNew, | ||||
const FlatFilePos &pos) | const FlatFilePos &pos) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
bool RollforwardBlock(const CBlockIndex *pindex, CCoinsViewCache &inputs, | bool RollforwardBlock(const CBlockIndex *pindex, CCoinsViewCache &inputs, | ||||
const Consensus::Params ¶ms) | const Consensus::Params ¶ms) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
}; | }; | ||||
/** | /** | ||||
* Mark a block as precious and reorganize. | * Mark a block as precious and reorganize. | ||||
* | * | ||||
* May not be called in a validationinterface callback. | * May not be called in a validationinterface callback. | ||||
*/ | */ | ||||
bool PreciousBlock(const Config &config, CValidationState &state, | bool PreciousBlock(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | ||||
/** | /** | ||||
* Mark a block as finalized. | * Mark a block as finalized. | ||||
* A finalized block can not be reorged in any way. | * A finalized block can not be reorged in any way. | ||||
*/ | */ | ||||
bool FinalizeBlockAndInvalidate(const Config &config, CValidationState &state, | bool FinalizeBlockAndInvalidate(const Config &config, | ||||
BlockValidationState &state, | |||||
CBlockIndex *pindex) | CBlockIndex *pindex) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** Mark a block as invalid. */ | /** Mark a block as invalid. */ | ||||
bool InvalidateBlock(const Config &config, CValidationState &state, | bool InvalidateBlock(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** Park a block. */ | /** Park a block. */ | ||||
bool ParkBlock(const Config &config, CValidationState &state, | bool ParkBlock(const Config &config, BlockValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** Remove invalidity status from a block and its descendants. */ | /** Remove invalidity status from a block and its descendants. */ | ||||
void ResetBlockFailureFlags(CBlockIndex *pindex) | void ResetBlockFailureFlags(CBlockIndex *pindex) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** Remove parked status from a block and its descendants. */ | /** Remove parked status from a block and its descendants. */ | ||||
void UnparkBlockAndChildren(CBlockIndex *pindex) | void UnparkBlockAndChildren(CBlockIndex *pindex) | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |