From e317db75e21314867164b363260ce63afad963bd Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 12:24:03 +0200 Subject: [PATCH] Test --- src/miner.cpp | 12 ++++++------ src/rpcmining.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index c5bffbddf..9f6d1b428 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -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 ) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 2ea6d4100..77d4de1b6 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -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