mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
validation: Make LoadBlockIndex() a member of ChainstateManager
This commit is contained in:
@@ -193,9 +193,6 @@ fs::path GetBlockPosFilename(const FlatFilePos &pos);
|
||||
void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFilePos* dbp = nullptr);
|
||||
/** Ensures we have a genesis block in the block tree, possibly writing one to disk. */
|
||||
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 CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
/** Unload database information */
|
||||
void UnloadBlockIndex();
|
||||
/** Run an instance of the script checking thread */
|
||||
@@ -868,6 +865,9 @@ public:
|
||||
CChain& ValidatedChain() const { return ValidatedChainstate().m_chain; }
|
||||
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 CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
//! Unload block index and chain data before shutdown.
|
||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user