Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 326 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Ensures we have a genesis block in the block tree, possibly writing one to | * Ensures we have a genesis block in the block tree, possibly writing one to | ||||
* 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 | |||||
* running with -reindex. | |||||
*/ | |||||
bool LoadBlockIndex(const Consensus::Params ¶ms) | |||||
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. | ||||
*/ | */ | ||||
void ThreadScriptCheck(int worker_num); | void ThreadScriptCheck(int worker_num); | ||||
▲ Show 20 Lines • Show All 868 Lines • ▼ Show 20 Lines | public: | ||||
//! | //! | ||||
//! During background validation of a snapshot, this is the IBD chain. After | //! During background validation of a snapshot, this is the IBD chain. After | ||||
//! background validation has completed, this is the snapshot chain. | //! background validation has completed, this is the snapshot chain. | ||||
CChainState &ValidatedChainstate() const; | CChainState &ValidatedChainstate() const; | ||||
CChain &ValidatedChain() const { return ValidatedChainstate().m_chain; } | CChain &ValidatedChain() const { return ValidatedChainstate().m_chain; } | ||||
CBlockIndex *ValidatedTip() const { return ValidatedChain().Tip(); } | CBlockIndex *ValidatedTip() const { return ValidatedChain().Tip(); } | ||||
//! Load the block tree and coins database from disk, initializing state if | |||||
//! we're running with -reindex | |||||
bool LoadBlockIndex(const Consensus::Params ¶ms) | |||||
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); | ||||
//! Clear (deconstruct) chainstate data. | //! Clear (deconstruct) chainstate data. | ||||
void Reset(); | void Reset(); | ||||
}; | }; | ||||
extern ChainstateManager g_chainman GUARDED_BY(::cs_main); | extern ChainstateManager g_chainman GUARDED_BY(::cs_main); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |