From 269fe243671d3a4a5ad374137d999cc4dbdf720f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 18 Mar 2017 13:28:18 +0200 Subject: [PATCH] Test --- src/main.cpp | 2 +- src/miner.cpp | 2 +- src/rpcmining.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 539aa92ae..37b024da7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1548,7 +1548,7 @@ bool IsInitialBlockDownload() else if ( pindexBestHeader != 0 && pindexBestHeader->nHeight > ptr->nHeight ) ptr = pindexBestHeader; if ( ASSETCHAINS_SYMBOL[0] == 0 ) - state = chainActive.Height() < 242000 && ((chainActive.Height() < ptr->nHeight - 24*6) || + state = ((chainActive.Height() < ptr->nHeight - 24*6) || ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())); else state = (chainActive.Height() < ptr->nHeight - 100); //fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge())); diff --git a/src/miner.cpp b/src/miner.cpp index 33fe68327..37f96015d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -590,7 +590,7 @@ void static BitcoinMiner(CWallet *pwallet) LOCK(cs_vNodes); fvNodesEmpty = vNodes.empty(); } - if (!fvNodesEmpty && !IsInitialBlockDownload()) + if (!fvNodesEmpty )//&& !IsInitialBlockDownload()) break; MilliSleep(5000); //fprintf(stderr,"fvNodesEmpty %d IsInitialBlockDownload(%s) %d\n",(int32_t)fvNodesEmpty,ASSETCHAINS_SYMBOL,(int32_t)IsInitialBlockDownload()); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 77d4de1b6..8dc4111a5 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -530,8 +530,8 @@ Value getblocktemplate(const Array& params, bool fHelp) if (vNodes.empty()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Zcash is not connected!"); - if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Zcash is downloading blocks..."); + //if (IsInitialBlockDownload()) + // throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Zcash is downloading blocks..."); static unsigned int nTransactionsUpdatedLast;