Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 626 Lines • ▼ Show 20 Lines | |||||
/** Replay blocks that aren't fully applied to the database. */ | /** Replay blocks that aren't fully applied to the database. */ | ||||
bool ReplayBlocks(const Consensus::Params ¶ms, CCoinsView *view); | bool ReplayBlocks(const Consensus::Params ¶ms, CCoinsView *view); | ||||
/** Find the last common block between the parameter chain and a locator. */ | /** Find the last common block between the parameter chain and a locator. */ | ||||
CBlockIndex *FindForkInGlobalIndex(const CChain &chain, | CBlockIndex *FindForkInGlobalIndex(const CChain &chain, | ||||
const CBlockLocator &locator); | const CBlockLocator &locator); | ||||
/** | /** Mark a block as precious and reorganize. */ | ||||
* Treats a block as if it were received before others with the same work, | |||||
* making it the active chain tip if applicable. Successive calls to | |||||
* PreciousBlock() will override the effects of earlier calls. The effects of | |||||
* calls to PreciousBlock() are not retained across restarts. | |||||
* | |||||
* Returns true if the provided block index successfully became the chain tip. | |||||
*/ | |||||
bool PreciousBlock(const Config &config, CValidationState &state, | bool PreciousBlock(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** | /** | ||||
* 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, CValidationState &state, | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |