Test
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -530,7 +530,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
|
||||
if (vNodes.empty())
|
||||
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Zcash is not connected!");
|
||||
|
||||
if (chainActive.Tip()->nHeight != 235300 && IsInitialBlockDownload())
|
||||
if (IsInitialBlockDownload())
|
||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Zcash is downloading blocks...");
|
||||
|
||||
static unsigned int nTransactionsUpdatedLast;
|
||||
@@ -697,7 +697,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
|
||||
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
|
||||
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
|
||||
|
||||
fprintf(stderr,"return complete template\n");
|
||||
//fprintf(stderr,"return complete template\n");
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user