message: validation: Use existing chainstate in ChainstateManager::ProcessNewBlockHeaders
  [META] This commit should be followed up by removing the comments and
  assertions meant only to show that the change is correct.
diff: @@ -3499,6 +3499,7 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS
  // Exposed wrapper for AcceptBlockHeader
  bool ChainstateManager::ProcessNewBlockHeaders(int32_t& nPoSTemperature, const uint256& lastAcceptedHeader, const std::vector<CBlockHeader>& headers, BlockValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex)
  {
  + assert(std::addressof(::ChainstateActive()) == std::addressof(ActiveChainstate()));
  AssertLockNotHeld(cs_main);
  {
  LOCK(cs_main);
  @@ -3515,7 +3516,7 @@ bool ChainstateManager::ProcessNewBlockHeaders(int32_t& nPoSTemperature, const u
  CBlockIndex *pindex = nullptr; // Use a temp pindex instead of ppindex to avoid a const_cast
  bool accepted = m_blockman.AcceptBlockHeader(
  header, state, chainparams, &pindex);
  - ::ChainstateActive().CheckBlockIndex(chainparams.GetConsensus());
  + ActiveChainstate().CheckBlockIndex(chainparams.GetConsensus());
  if (!accepted) {
  nPoSTemperature += POW_HEADER_COOLING;
  @@ -3533,8 +3534,8 @@ bool ChainstateManager::ProcessNewBlockHeaders(int32_t& nPoSTemperature, const u
  }
  }
  }
  - if (NotifyHeaderTip(::ChainstateActive())) {
  - if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
  + if (NotifyHeaderTip(ActiveChainstate())) {
  + if (ActiveChainstate().IsInitialBlockDownload() && ppindex && *ppindex) {
  LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
  }
  }
  