uint64_t nLastBlockTx = 0;
uint64_t nLastBlockSize = 0;
-int64_t nLastCoinStakeSearchInterval = 0;
+uint32_t nLastCoinStakeSearchInterval = 0;
// We want to sort transactions by priority and fee, so:
typedef boost::tuple<double, double, CTransaction*> TxPriority;
// 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
//