message: Only launch a separate thread when PV is enabled.
  If the user has opted not to run with PV enabled then make
  sure to run in the original single threaded mode.
diff: @@ -392,18 +392,18 @@ void CParallelValidation::HandleBlockMessage(CNode *pfrom, const string &strComm
  if (mapBlockValidationThreads.size() >= nScriptCheckQueues)
  {
  uint64_t nLargestBlockSize = 0;
  - map<boost::thread::id, CParallelValidation::CHandleBlockMsgThreads>::iterator miLargestBlock;
  + map<boost::thread::id, CParallelValidation::CHandleBlockMsgThreads>::iterator miLargestBlock = mapBlockValidationThreads.end();
  map<boost::thread::id, CParallelValidation::CHandleBlockMsgThreads>::iterator iter = mapBlockValidationThreads.begin();
  while (iter != mapBlockValidationThreads.end())
  {
  // Find largest block where the previous block hash matches. Meaning this is a new block and it's a competitor to to your block.
  - map<boost::thread::id, CParallelValidation::CHandleBlockMsgThreads>::iterator mi = iter++;
  - if ((*mi).second.hashPrevBlock == block.GetBlockHeader().hashPrevBlock) {
  - if ((*mi).second.nBlockSize > nLargestBlockSize) {
  - nLargestBlockSize = (*mi).second.nBlockSize;
  - miLargestBlock = mi;
  + if ((*iter).second.hashPrevBlock == block.GetBlockHeader().hashPrevBlock) {
  + if ((*iter).second.nBlockSize > nLargestBlockSize) {
  + nLargestBlockSize = (*iter).second.nBlockSize;
  + miLargestBlock = iter;
  }
  }
  + iter++;
  }
  // if your block is the biggest or of equal size to the biggest then reject it.
  @@ -411,7 +411,7 @@ void CParallelValidation::HandleBlockMessage(CNode *pfrom, const string &strComm
  LogPrint("parallel", "Block validation terminated - Too many blocks currently being validated: %s\n", block.GetHash().ToString());
  return; // new block is rejected and does not enter PV
  }
  - else { // terminate the chosen PV thread
  + else if (miLargestBlock != mapBlockValidationThreads.end()) { // terminate the chosen PV thread
  (*miLargestBlock).second.pScriptQueue->Quit(); // terminate the script queue threads
  LogPrint("parallel", "Sending Quit() to scriptcheckqueue\n");
  (*miLargestBlock).second.fQuit = true; // terminate the PV thread
  @@ -436,9 +436,16 @@ void CParallelValidation::HandleBlockMessage(CNode *pfrom, const string &strComm
  LOCK(cs_vNodes);
  pfrom->AddRef();
  }
  +
  + // only launch block validation in a separate thread if PV is enabled.
  + if (PV.Enabled()) {
  boost::thread thread(boost::bind(&HandleBlockMessageThread, pfrom, strCommand, block, inv));
  thread.detach(); // Separate actual thread from the "thread" object so its fine to fall out of scope
  }
  + else {
  + HandleBlockMessageThread(pfrom, strCommand, block, inv);
  + }
  +}
  void HandleBlockMessageThread(CNode *pfrom, const string &strCommand, const CBlock &block, const CInv &inv)
  {
  