test
This commit is contained in:
@@ -1469,16 +1469,25 @@ bool IsInitialBlockDownload()
|
|||||||
const CChainParams& chainParams = Params();
|
const CChainParams& chainParams = Params();
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
if (fImporting || fReindex)
|
if (fImporting || fReindex)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
|
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
|
||||||
|
{
|
||||||
|
fprintf(stderr,"checkpoint -> initialdownload\n");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
static bool lockIBDState = false;
|
static bool lockIBDState = false;
|
||||||
if (lockIBDState)
|
if (lockIBDState)
|
||||||
return false;
|
return false;
|
||||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
||||||
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
|
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
|
||||||
if (!state)
|
if (!state)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"lockIBDState tru\n");
|
||||||
lockIBDState = true;
|
lockIBDState = true;
|
||||||
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
|||||||
if (!fvNodesEmpty && !IsInitialBlockDownload())
|
if (!fvNodesEmpty && !IsInitialBlockDownload())
|
||||||
break;
|
break;
|
||||||
MilliSleep(5000);
|
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);
|
} while (true);
|
||||||
fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
|
fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL);
|
||||||
|
|||||||
Reference in New Issue
Block a user