message: [Cleanup] Remove unused variables in miner
  remove:
  nLastCoinStakeSearchTime (and nSearchTime/fStakeFound + if block)
  fLastLoopOrphan
diff: @@ -157,30 +157,19 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, CWallet* pwallet,
  pblocktemplate->vTxFees.push_back(-1); // updated at end
  pblocktemplate->vTxSigOps.push_back(-1); // updated at end
  - // ppcoin: if coinstake available add coinstake tx
  - static int64_t nLastCoinStakeSearchTime = GetAdjustedTime(); // only initialized at startup
  -
  if (fProofOfStake) {
  boost::this_thread::interruption_point();
  pblock->nTime = GetAdjustedTime();
  pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
  CMutableTransaction txCoinStake;
  - int64_t nSearchTime = pblock->nTime; // search to current time
  - bool fStakeFound = false;
  - if (nSearchTime >= nLastCoinStakeSearchTime) {
  int64_t nTxNewTime = 0;
  if (pwallet->CreateCoinStake(*pwallet, pindexPrev, pblock->nBits, txCoinStake, nTxNewTime)) {
  pblock->nTime = nTxNewTime;
  pblock->vtx[0].vout[0].SetEmpty();
  pblock->vtx.push_back(CTransaction(txCoinStake));
  - fStakeFound = true;
  - }
  - nLastCoinStakeSearchTime = nSearchTime;
  - }
  -
  - if (!fStakeFound) {
  + } else {
  LogPrint("staking", "CreateNewBlock(): stake not found\n");
  - return NULL;
  + return nullptr;
  }
  }
  @@ -671,7 +660,6 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
  // Each thread has its own key and counter
  CReserveKey reservekey(pwallet);
  unsigned int nExtraNonce = 0;
  - bool fLastLoopOrphan = false;
  bool fColdStake = GetBoolArg("-coldstaking", true);
  CAmount stakingBalance = 0;
  @@ -705,8 +693,7 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
  const bool fTimeV2 = Params().IsTimeProtocolV2(chainActive.Height()+1);
  //search our map of hashed blocks, see if bestblock has been hashed yet
  - if (pwallet->pStakerStatus->GetLastHash() == chainActive.Tip()->GetBlockHash()
  - && !fLastLoopOrphan)
  + if (pwallet->pStakerStatus->GetLastHash() == chainActive.Tip()->GetBlockHash())
  {
  uint256 lastHashTime = pwallet->pStakerStatus->GetLastTime();
  if ( (!fTimeV2 && GetTime() < lastHashTime + 22) ||
  @@ -766,10 +753,10 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
  continue;
  }
  - LogPrintf("CPUMiner : proof-of-stake block was signed %s \n", pblock->GetHash().ToString().c_str());
  + LogPrintf("%s : proof-of-stake block was signed %s \n", __func__, pblock->GetHash().ToString().c_str());
  SetThreadPriority(THREAD_PRIORITY_NORMAL);
  if (!ProcessBlockFound(pblock, *pwallet, reservekey)) {
  - fLastLoopOrphan = true;
  + LogPrintf("%s: New block orphaned\n", __func__);
  continue;
  }
  SetThreadPriority(THREAD_PRIORITY_LOWEST);
  