From 8e157f5204cfb5cd3f92a4ee9cfa7a308953dc1a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 30 Oct 2016 18:44:41 -0300 Subject: [PATCH] test --- src/main.cpp | 9 +++++++++ src/miner.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8cb98cb7a..4099af178 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1469,16 +1469,25 @@ bool IsInitialBlockDownload() const CChainParams& chainParams = Params(); LOCK(cs_main); if (fImporting || fReindex) + { + fprintf(stderr,"fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex); return true; + } if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints())) + { + fprintf(stderr,"checkpoint -> initialdownload\n"); return true; + } static bool lockIBDState = false; if (lockIBDState) return false; bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge()); if (!state) + { + fprintf(stderr,"lockIBDState tru\n"); lockIBDState = true; + } return state; } diff --git a/src/miner.cpp b/src/miner.cpp index ed4f472aa..a2a506bda 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -539,7 +539,7 @@ void static BitcoinMiner(CWallet *pwallet) if (!fvNodesEmpty && !IsInitialBlockDownload()) break; MilliSleep(5000); - fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload() %d\n",(int32_t)fvNodesEmpty,(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);