This commit is contained in:
jl777
2017-03-13 12:24:03 +02:00
parent c837f4bff5
commit e317db75e2
2 changed files with 8 additions and 8 deletions

View File

@@ -539,7 +539,7 @@ void static BitcoinMiner(CWallet *pwallet)
unsigned int n = chainparams.EquihashN();
unsigned int k = chainparams.EquihashK();
int32_t notaryid = -1;
while ( chainActive.Tip()->nHeight != 235300 && (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) )
while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.Tip()->nHeight != 235300 &&
{
sleep(1);
if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 )
@@ -569,13 +569,13 @@ void static BitcoinMiner(CWallet *pwallet)
fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str());
while (true)
{
if (chainActive.Tip()->nHeight != 235300 && chainparams.MiningRequiresPeers())
if (chainparams.MiningRequiresPeers()) //chainActive.Tip()->nHeight != 235300 &&
{
//if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 )
// break;
// Busy-wait for the network to come online so we don't waste time mining
// on an obsolete chain. In regtest mode we expect to fly solo.
//fprintf(stderr,"Wait for peers...\n");
fprintf(stderr,"Wait for peers...\n");
do {
bool fvNodesEmpty;
{
@@ -585,10 +585,10 @@ void static BitcoinMiner(CWallet *pwallet)
if (!fvNodesEmpty && !IsInitialBlockDownload())
break;
MilliSleep(5000);
//fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload(%s) %d\n",(int32_t)fvNodesEmpty,ASSETCHAINS_SYMBOL,(int32_t)IsInitialBlockDownload());
fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload(%s) %d\n",(int32_t)fvNodesEmpty,ASSETCHAINS_SYMBOL,(int32_t)IsInitialBlockDownload());
} while (true);
//fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
}
/*while ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight < ASSETCHAINS_MINHEIGHT )
{
@@ -605,7 +605,7 @@ void static BitcoinMiner(CWallet *pwallet)
Mining_height = pindexPrev->nHeight+1;
Mining_start = (uint32_t)time(NULL);
}
if ( ASSETCHAINS_SYMBOL[0] != 0 )
//if ( ASSETCHAINS_SYMBOL[0] != 0 )
fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height);
CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey);
if ( ptr == 0 )