Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | |||||
* Load the block tree and coins database from disk, initializing state if we're | * Load the block tree and coins database from disk, initializing state if we're | ||||
* running with -reindex. | * running with -reindex. | ||||
*/ | */ | ||||
bool LoadBlockIndex(const Config &config); | bool LoadBlockIndex(const Config &config); | ||||
/** | /** | ||||
* Update the chain tip based on database information. | * Update the chain tip based on database information. | ||||
*/ | */ | ||||
bool LoadChainTip(const Config &config); | bool LoadChainTip(const Config &config) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Unload database information. | * Unload database information. | ||||
*/ | */ | ||||
void UnloadBlockIndex(); | void UnloadBlockIndex(); | ||||
/** | /** | ||||
* Run an instance of the script checking thread. | * Run an instance of the script checking thread. | ||||
▲ Show 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | bool VerifyDB(const Config &config, CCoinsView *coinsview, int nCheckLevel, | ||||
int nCheckDepth); | int nCheckDepth); | ||||
}; | }; | ||||
/** 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) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | /** | ||||
* Mark a block as precious and reorganize. | * Mark a block as precious and reorganize. | ||||
* | * | ||||
* 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 PreciousBlock(const Config &config, CValidationState &state, | bool PreciousBlock(const Config &config, CValidationState &state, | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |