We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2d0fc6 commit 9ec75c5Copy full SHA for 9ec75c5
src/main.cpp
@@ -1177,8 +1177,14 @@ bool IsInitialBlockDownload()
1177
LOCK(cs_main);
1178
if (fImporting || fReindex || chainActive.Height() < Checkpoints::GetTotalBlocksEstimate())
1179
return true;
1180
- return (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
+ static bool lockIBDState = false;
1181
+ if (lockIBDState)
1182
+ return false;
1183
+ bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
1184
pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
1185
+ if (!state)
1186
+ lockIBDState = true;
1187
+ return state;
1188
}
1189
1190
bool fLargeWorkForkFound = false;
0 commit comments