Test
This commit is contained in:
@@ -1528,18 +1528,18 @@ bool IsInitialBlockDownload()
|
|||||||
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);
|
fprintf(stderr,"IsInitialBlockDownload: 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");
|
fprintf(stderr,"IsInitialBlockDownload: checkpoint -> initialdownload\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
static bool lockIBDState = false;
|
static bool lockIBDState = false;
|
||||||
if (lockIBDState)
|
if (lockIBDState)
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"lockIBDState true %d < %d\n",chainActive.Height(),pindexBestHeader->nHeight - 10);
|
fprintf(stderr,"lockIBDState true %d < %d\n",chainActive.Height(),pindexBestHeader->nHeight - 10);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool state;
|
bool state;
|
||||||
@@ -1547,9 +1547,9 @@ bool IsInitialBlockDownload()
|
|||||||
state = (chainActive.Height() < pindexBestHeader->nHeight - 24*6) ||
|
state = (chainActive.Height() < pindexBestHeader->nHeight - 24*6) ||
|
||||||
pindexBestHeader->GetBlockTime() < (GetTime() - chainParams.MaxTipAge());
|
pindexBestHeader->GetBlockTime() < (GetTime() - chainParams.MaxTipAge());
|
||||||
else state = (chainActive.Height() < pindexBestHeader->nHeight - 100);
|
else state = (chainActive.Height() < pindexBestHeader->nHeight - 100);
|
||||||
|
fprintf(stderr,"state.%d ht.%d t.%d\n",state,(int32_t)chainActive.Height(),(int32_t)pindexBestHeader->GetBlockTime());
|
||||||
if (!state)
|
if (!state)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"lockIBDState true ht.%d t.%d\n",(int32_t)chainActive.Height(),(int32_t)pindexBestHeader->GetBlockTime());
|
|
||||||
lockIBDState = true;
|
lockIBDState = true;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|||||||
Reference in New Issue
Block a user