Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | public: | ||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(cs_main); | void Unload() 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); | ||||
//! Mark one block file as pruned (modify associated database entries) | |||||
void PruneOneBlockFile(const int fileNumber) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | /** | ||||
* 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 | ||||
* m_block_index. | * m_block_index. | ||||
*/ | */ | ||||
bool AcceptBlockHeader(const Config &config, const CBlockHeader &block, | bool AcceptBlockHeader(const Config &config, const CBlockHeader &block, | ||||
BlockValidationState &state, CBlockIndex **ppindex) | BlockValidationState &state, CBlockIndex **ppindex) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
▲ Show 20 Lines • Show All 571 Lines • ▼ Show 20 Lines | public: | ||||
* @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, | ||||
BlockValidationState &state, | BlockValidationState &state, | ||||
const CBlockIndex **ppindex = nullptr) | const CBlockIndex **ppindex = nullptr) | ||||
LOCKS_EXCLUDED(cs_main); | LOCKS_EXCLUDED(cs_main); | ||||
//! Mark one block file as pruned (modify associated database entries) | |||||
void PruneOneBlockFile(const int fileNumber) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
//! Load the block tree and coins database from disk, initializing state if | //! Load the block tree and coins database from disk, initializing state if | ||||
//! we're running with -reindex | //! we're running with -reindex | ||||
bool LoadBlockIndex(const Consensus::Params ¶ms) | bool LoadBlockIndex(const Consensus::Params ¶ms) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
//! Unload block index and chain data before shutdown. | //! Unload block index and chain data before shutdown. | ||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |