From cb237ef8c63306cc48ff77dfd6f566e5244edad1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 30 Oct 2016 18:50:46 -0300 Subject: [PATCH] test --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4099af178..ef0b3c0b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1466,7 +1466,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) bool IsInitialBlockDownload() { - const CChainParams& chainParams = Params(); + int32_t gap; const CChainParams& chainParams = Params(); LOCK(cs_main); if (fImporting || fReindex) { @@ -1480,9 +1480,14 @@ bool IsInitialBlockDownload() } static bool lockIBDState = false; if (lockIBDState) + { + fprintf(stderr,"lockIBDState true\n"); return false; - bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || + } + gap = ASSETCHAINS_SYMBOL[0] == 0 ? 24 * 6 : 1; + bool state = (chainActive.Height() < pindexBestHeader->nHeight - gap || pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge()); + fprintf(stderr,"height.%d < best.%d\n",chainActive.Height(),pindexBestHeader->nHeight); if (!state) { fprintf(stderr,"lockIBDState tru\n");