Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | |||||
* disk. | * disk. | ||||
*/ | */ | ||||
bool LoadGenesisBlock(const CChainParams &chainparams); | bool LoadGenesisBlock(const CChainParams &chainparams); | ||||
/** | /** | ||||
* 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) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | bool LoadBlockIndex(const Consensus::Params ¶ms) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | /** | ||||
* Update the chain tip based on database information. | * Update the chain tip based on database information. | ||||
*/ | */ | ||||
bool LoadChainTip(const Config &config) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | bool LoadChainTip(const Config &config) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Unload database information. | * Unload database information. | ||||
▲ Show 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
CChain m_chain; | CChain m_chain; | ||||
BlockMap mapBlockIndex GUARDED_BY(cs_main); | BlockMap mapBlockIndex GUARDED_BY(cs_main); | ||||
std::multimap<CBlockIndex *, CBlockIndex *> mapBlocksUnlinked; | std::multimap<CBlockIndex *, CBlockIndex *> mapBlocksUnlinked; | ||||
CBlockIndex *pindexBestInvalid = nullptr; | CBlockIndex *pindexBestInvalid = nullptr; | ||||
CBlockIndex *pindexBestParked = nullptr; | CBlockIndex *pindexBestParked = nullptr; | ||||
CBlockIndex const *pindexFinalized = nullptr; | CBlockIndex const *pindexFinalized = nullptr; | ||||
bool LoadBlockIndex(const Config &config, CBlockTreeDB &blocktree) | bool LoadBlockIndex(const Consensus::Params ¶ms, | ||||
CBlockTreeDB &blocktree) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** | /** | ||||
* Update the on-disk chain state. | * Update the on-disk chain state. | ||||
* The caches and indexes are flushed depending on the mode we're called | * The caches and indexes are flushed depending on the mode we're called | ||||
* with if they're too large, if it's been a while since the last write, or | * with if they're too large, if it's been a while since the last write, or | ||||
* always and in all cases if we're in prune mode and are deleting files. | * always and in all cases if we're in prune mode and are deleting files. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |