@@ -3775,6 +3775,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, Block
3775
3775
bool ChainstateManager::ProcessNewBlock (const CChainParams& chainparams, const std::shared_ptr<const CBlock> pblock, bool fForceProcessing , bool * fNewBlock )
3776
3776
{
3777
3777
AssertLockNotHeld (cs_main);
3778
+ assert (std::addressof (::ChainstateActive ()) == std::addressof (ActiveChainstate ()));
3778
3779
3779
3780
{
3780
3781
CBlockIndex *pindex = nullptr ;
@@ -3790,18 +3791,18 @@ bool ChainstateManager::ProcessNewBlock(const CChainParams& chainparams, const s
3790
3791
bool ret = CheckBlock (*pblock, state, chainparams.GetConsensus ());
3791
3792
if (ret) {
3792
3793
// Store to disk
3793
- ret = :: ChainstateActive ().AcceptBlock (pblock, state, chainparams, &pindex, fForceProcessing , nullptr , fNewBlock );
3794
+ ret = ActiveChainstate ().AcceptBlock (pblock, state, chainparams, &pindex, fForceProcessing , nullptr , fNewBlock );
3794
3795
}
3795
3796
if (!ret) {
3796
3797
GetMainSignals ().BlockChecked (*pblock, state);
3797
3798
return error (" %s: AcceptBlock FAILED (%s)" , __func__, state.ToString ());
3798
3799
}
3799
3800
}
3800
3801
3801
- NotifyHeaderTip (:: ChainstateActive ());
3802
+ NotifyHeaderTip (ActiveChainstate ());
3802
3803
3803
3804
BlockValidationState state; // Only used to report errors, not invalidity - ignore it
3804
- if (!:: ChainstateActive ().ActivateBestChain (state, chainparams, pblock))
3805
+ if (!ActiveChainstate ().ActivateBestChain (state, chainparams, pblock))
3805
3806
return error (" %s: ActivateBestChain failed (%s)" , __func__, state.ToString ());
3806
3807
3807
3808
return true ;
0 commit comments