diff options
author | James O'Beirne <james.obeirne@gmail.com> | 2019-03-29 14:09:55 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@gmail.com> | 2019-09-17 09:45:38 -0400 |
commit | bcf73d3b84649c8786f0cccc6862dd1bbdb9950b (patch) | |
tree | 03052fdd42629f875f9f4deccac13885f10c443e /src/validation.h | |
parent | f5809d5b135c7f9de5217d3cda76638fe7eed58a (diff) |
refactoring: move LoadChainTip to CChainState method
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h index e3ef051115..a6decf9a99 100644 --- a/src/validation.h +++ b/src/validation.h @@ -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); |