Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 827 Lines • ▼ Show 20 Lines | public: | ||||
// Block disconnection on our pcoinsTip: | // Block disconnection on our pcoinsTip: | ||||
bool DisconnectTip(const CChainParams ¶ms, CValidationState &state, | bool DisconnectTip(const CChainParams ¶ms, CValidationState &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, CValidationState &state, | ||||
CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | ||||
/** | |||||
* Finalize a block. | |||||
* A finalized block can not be reorged in any way. | |||||
*/ | |||||
bool FinalizeBlock(const Config &config, CValidationState &state, | |||||
CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
bool UnwindBlock(const Config &config, CValidationState &state, | bool UnwindBlock(const Config &config, CValidationState &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> | ||||
Show All 27 Lines | bool ConnectTip(const Config &config, CValidationState &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); | ||||
bool MarkBlockAsFinal(const Config &config, CValidationState &state, | |||||
const CBlockIndex *pindex) | |||||
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. | ||||
Show All 15 Lines | |||||
/** | /** | ||||
* 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, CValidationState &state, | ||||
CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); | ||||
/** | |||||
* Mark a block as finalized. | |||||
* A finalized block can not be reorged in any way. | |||||
*/ | |||||
bool FinalizeBlockAndInvalidate(const Config &config, CValidationState &state, | |||||
CBlockIndex *pindex) | |||||
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, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** Park a block. */ | /** Park a block. */ | ||||
bool ParkBlock(const Config &config, CValidationState &state, | bool ParkBlock(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |