From ad84148d8b087b692178a82215da894edd794f7f Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 15 Mar 2017 10:23:06 +0200 Subject: [PATCH] Test --- src/main.cpp | 2 +- src/miner.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c26aa990a..e27561820 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1549,7 +1549,7 @@ bool IsInitialBlockDownload() else state = (chainActive.Height() < pindexBestHeader->nHeight - 100); if (!state) { - fprintf(stderr,"lockIBDState true ht.%d t.%d\n",chainActive.Height(),pindexBestHeader->GetBlockTime()); + fprintf(stderr,"lockIBDState true ht.%d t.%d\n",(int32_t)chainActive.Height(),(int32_t)pindexBestHeader->GetBlockTime()); lockIBDState = true; } return state; diff --git a/src/miner.cpp b/src/miner.cpp index 81109eb6c..597b5e400 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -572,7 +572,7 @@ void static BitcoinMiner(CWallet *pwallet) ); try { - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { @@ -582,7 +582,7 @@ void static BitcoinMiner(CWallet *pwallet) // 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; { @@ -592,10 +592,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 ) { @@ -612,7 +612,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 )