mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactoring: move LoadChainTip to CChainState method
This commit is contained in:
@@ -240,8 +240,6 @@ 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);
|
||||
/** Update the chain tip based on database information. */
|
||||
bool LoadChainTip(const CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
/** Unload database information */
|
||||
void UnloadBlockIndex();
|
||||
/** Run an instance of the script checking thread */
|
||||
@@ -721,6 +719,9 @@ public:
|
||||
*/
|
||||
void CheckBlockIndex(const Consensus::Params& consensusParams);
|
||||
|
||||
/** Update the chain tip based on database information, i.e. CoinsTip()'s best block. */
|
||||
bool LoadChainTip(const CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
private:
|
||||
bool ActivateBestChainStep(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const std::shared_ptr<const CBlock>& pblock, bool& fInvalidFound, ConnectTrace& connectTrace) EXCLUSIVE_LOCKS_REQUIRED(cs_main, ::mempool.cs);
|
||||
bool ConnectTip(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexNew, const std::shared_ptr<const CBlock>& pblock, ConnectTrace& connectTrace, DisconnectedBlockTransactions& disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, ::mempool.cs);
|
||||
|
||||
Reference in New Issue
Block a user