aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-09-15 15:26:36 -0400
committerCarl Dong <contact@carldong.me>2021-01-28 14:15:26 -0500
commit5f8cd7b3a527999512161956db4d718688cb956f (patch)
treeb90e409cee9deb189cad076e0cfde747525666c6 /src/validation.cpp
parent2a696472a1423e877bfa83f016f66c7e45be7369 (diff)
validation: Remove global ::ActivateBestChain
Instead use CChainState::ActivateBestChain, which is what the global one calls anyway.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp6
1 files changed, 1 insertions, 5 deletions
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<const CBlock> 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;
}
}