From 5f8cd7b3a527999512161956db4d718688cb956f Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 15 Sep 2020 15:26:36 -0400 Subject: validation: Remove global ::ActivateBestChain Instead use CChainState::ActivateBestChain, which is what the global one calls anyway. --- src/validation.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/validation.cpp') diff --git a/src/validation.cpp b/src/validation.cpp index 16245cae8d..70e01cfddd 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2899,10 +2899,6 @@ bool CChainState::ActivateBestChain(BlockValidationState &state, const CChainPar return true; } -bool ActivateBestChain(BlockValidationState &state, const CChainParams& chainparams, std::shared_ptr pblock) { - return ::ChainstateActive().ActivateBestChain(state, chainparams, std::move(pblock)); -} - bool CChainState::PreciousBlock(BlockValidationState& state, const CChainParams& params, CBlockIndex *pindex) { { @@ -4681,7 +4677,7 @@ void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi // Activate the genesis block so normal node progress can continue if (hash == chainparams.GetConsensus().hashGenesisBlock) { BlockValidationState state; - if (!ActivateBestChain(state, chainparams, nullptr)) { + if (!::ChainstateActive().ActivateBestChain(state, chainparams, nullptr)) { break; } } -- cgit v1.2.3