message: Do not try to stake unless connected to peers.
diff: @@ -689,10 +689,10 @@ void BitcoinMiner(std::shared_ptr<CReserveScript> coinbaseScript, bool fProofOfS
  if (fProofOfStake) {
  //Need wallet if this is for proof of stake
  auto pwallet = GetMainWallet();
  -// if (!pwallet || !g_connman->GetNodeCount(CConnman::NumConnections::CONNECTIONS_ALL)) {
  -// MilliSleep(5000);
  -// continue;
  -// }
  + if (!pwallet || !g_connman->GetNodeCount(CConnman::NumConnections::CONNECTIONS_ALL)) {
  + MilliSleep(5000);
  + continue;
  + }
  //control the amount of times the client will check for mintable coins
  if ((GetTime() - nMintableLastCheck > 5 * 60)) // 5 minute check time
  @@ -715,10 +715,10 @@ void BitcoinMiner(std::shared_ptr<CReserveScript> coinbaseScript, bool fProofOfS
  continue;
  }
  - if (mapHashedBlocks.count(chainActive.Tip()->nHeight)) //search our map of hashed blocks, see if bestblock has been hashed yet
  - {
  - if (GetTime() - mapHashedBlocks[chainActive.Tip()->nHeight] < max(60, 1)) // wait half of the nHashDrift with max wait of 3 minutes
  - {
  + //search our map of hashed blocks, see if bestblock has been hashed yet
  + if (mapHashedBlocks.count(chainActive.Tip()->nHeight)) {
  + // wait half of the nHashDrift with max wait of 3 minutes
  + if (GetTime() - mapHashedBlocks[chainActive.Tip()->nHeight] < max(60, 1)) {
  MilliSleep(5000);
  continue;
  }
  