message: Optimization for headers (continued)
diff: @@ -4293,7 +4293,7 @@ bool ContextualCheckBlock(const CBlock &block, CValidationState &state, CBlockIn
  }
  static bool AcceptBlockHeader(const CBlockHeader &block, CValidationState &state, const CChainParams &chainparams,
  - CBlockIndex **ppindex = NULL) {
  + CBlockIndex **ppindex = NULL, bool fCheckPOW = true) {
  // LogPrintf("---AcceptBlockHeader hash=%s--\n", block.GetHash().ToString());
  AssertLockHeld(cs_main);
  // Check for duplicate
  @@ -4315,7 +4315,7 @@ static bool AcceptBlockHeader(const CBlockHeader &block, CValidationState &state
  // int nHeight = ZerocoinGetNHeight(block);
  // int64_t start = std::chrono::duration_cast<std::chrono::milliseconds>(
  // std::chrono::system_clock::now().time_since_epoch()).count();
  - if (!CheckBlockHeader(block, state, chainparams.GetConsensus()))
  + if (!CheckBlockHeader(block, state, chainparams.GetConsensus(), fCheckPOW))
  return error("%s: Consensus::CheckBlockHeader: %s, %s", __func__, hash.ToString(),
  FormatStateMessage(state));
  // int64_t end = std::chrono::duration_cast<std::chrono::milliseconds>(
  @@ -6884,7 +6884,7 @@ bool static ProcessMessage(CNode *pfrom, string strCommand, CDataStream &vRecv,
  return error("non-continuous headers sequence");
  }
  //TODOS
  - if (!AcceptBlockHeader(header, state, chainparams, &pindexLast)) {
  + if (!AcceptBlockHeader(header, state, chainparams, &pindexLast, false)) {
  int nDoS;
  if (state.IsInvalid(nDoS)) {
  if (nDoS > 0) Misbehaving(pfrom->GetId(), nDoS);
  