// Make this thread recognisable as the mining thread
RenameThread("novacoin-miner");
+ bool fTrySync = true;
+
// Each thread has its own counter
unsigned int nExtraNonce = 0;
while (vNodes.empty() || IsInitialBlockDownload())
{
+ fTrySync = true;
+
Sleep(1000);
if (fShutdown)
return;
}
+ if (fTrySync)
+ {
+ fTrySync = false;
+ if (vNodes.size() < 3 || nBestHeight < GetNumBlocksOfPeers())
+ {
+ Sleep(1000);
+ continue;
+ }
+ }
+
//
// Create new block
//