mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-03-13 05:41:11 +00:00
enable miner
This commit is contained in:
parent
af5036dfb0
commit
def4d47f84
@ -75,7 +75,9 @@ namespace Checkpoints
|
||||
|
||||
bool CheckBlock(int nHeight, const uint256& hash)
|
||||
{
|
||||
if (fTestNet) return true; // Testnet has no checkpoints
|
||||
// TODO:
|
||||
return true;
|
||||
/*if (fTestNet) return true; // Testnet has no checkpoints
|
||||
if (!GetBoolArg("-checkpoints", true))
|
||||
return true;
|
||||
|
||||
@ -83,7 +85,7 @@ namespace Checkpoints
|
||||
|
||||
MapCheckpoints::const_iterator i = checkpoints.find(nHeight);
|
||||
if (i == checkpoints.end()) return true;
|
||||
return hash == i->second;
|
||||
return hash == i->second;*/
|
||||
}
|
||||
|
||||
// Guess how far we are in the verification process at the given block index
|
||||
|
14
src/main.cpp
14
src/main.cpp
@ -4729,8 +4729,8 @@ void static UnioncoinMiner(CWallet *pwallet)
|
||||
unsigned int nExtraNonce = 0;
|
||||
|
||||
try { loop {
|
||||
while (vNodes.empty())
|
||||
MilliSleep(1000);
|
||||
/* while (vNodes.empty())
|
||||
MilliSleep(1000);*/
|
||||
|
||||
//
|
||||
// Create new block
|
||||
@ -4803,8 +4803,8 @@ void static UnioncoinMiner(CWallet *pwallet)
|
||||
|
||||
// Check for stop or if block needs to be rebuilt
|
||||
boost::this_thread::interruption_point();
|
||||
if (vNodes.empty())
|
||||
break;
|
||||
/* if (vNodes.empty())
|
||||
break;*/
|
||||
if (pblock->nNonce >= 0xffff0000)
|
||||
break;
|
||||
if (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)
|
||||
@ -4827,7 +4827,7 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet)
|
||||
{
|
||||
static boost::thread_group* minerThreads = NULL;
|
||||
|
||||
int nThreads = GetArg("-genproclimit", -1);
|
||||
int nThreads = 1; //GetArg("-genproclimit", -1);
|
||||
if (nThreads < 0)
|
||||
nThreads = boost::thread::hardware_concurrency();
|
||||
|
||||
@ -4838,8 +4838,8 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet)
|
||||
minerThreads = NULL;
|
||||
}
|
||||
|
||||
if (nThreads == 0 || !fGenerate)
|
||||
return;
|
||||
/*if (nThreads == 0 || !fGenerate)
|
||||
return;*/
|
||||
|
||||
minerThreads = new boost::thread_group();
|
||||
for (int i = 0; i < nThreads; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user