Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | |||||
* install a CValidationInterface (see validationinterface.h) - this will have | * install a CValidationInterface (see validationinterface.h) - this will have | ||||
* its BlockChecked method called whenever *any* block completes validation. | * its BlockChecked method called whenever *any* block completes validation. | ||||
* | * | ||||
* Note that we guarantee that either the proof-of-work is valid on pblock, or | * Note that we guarantee that either the proof-of-work is valid on pblock, or | ||||
* (and possibly also) BlockChecked will have been called. | * (and possibly also) BlockChecked will have been called. | ||||
* | * | ||||
* Call without cs_main held. | * Call without cs_main held. | ||||
* | * | ||||
* @param[in] config The global config. | |||||
* @param[in] pblock The block we want to process. | * @param[in] pblock The block we want to process. | ||||
* @param[in] fForceProcessing Process this block even if unrequested; used | * @param[in] fForceProcessing Process this block even if unrequested; used | ||||
* for non-network block sources and whitelisted peers. | * for non-network block sources and whitelisted peers. | ||||
* @param[out] fNewBlock A boolean which is set to indicate if the block was | * @param[out] fNewBlock A boolean which is set to indicate if the block was | ||||
* first received via this call | * first received via this call. | ||||
* @return true if the block is accepted as a valid block | * @return True if the block is accepted as a valid block. | ||||
*/ | */ | ||||
bool ProcessNewBlock(const Config &config, | bool ProcessNewBlock(const Config &config, | ||||
const std::shared_ptr<const CBlock> pblock, | const std::shared_ptr<const CBlock> pblock, | ||||
bool fForceProcessing, bool *fNewBlock); | bool fForceProcessing, bool *fNewBlock); | ||||
/** | /** | ||||
* Process incoming block headers. | * Process incoming block headers. | ||||
* | * | ||||
* Call without cs_main held. | * Call without cs_main held. | ||||
* | * | ||||
* @param[in] block The block headers themselves | * @param[in] config The global config. | ||||
* @param[in] block The block headers themselves. | |||||
* @param[out] state This may be set to an Error state if any error occurred | * @param[out] state This may be set to an Error state if any error occurred | ||||
* processing them | * processing them. | ||||
* @param[in] chainparams The params for the chain we want to connect to | |||||
* @param[out] ppindex If set, the pointer will be set to point to the last new | * @param[out] ppindex If set, the pointer will be set to point to the last new | ||||
* block index object for the given headers | * block index object for the given headers. | ||||
* @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, | CValidationState &state, | ||||
const CBlockIndex **ppindex = nullptr); | const CBlockIndex **ppindex = nullptr); | ||||
/** Check whether enough disk space is available for an incoming block */ | /** Check whether enough disk space is available for an incoming block */ | ||||
bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); | bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); | ||||
▲ Show 20 Lines • Show All 391 Lines • Show Last 20 Lines |