MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / IsInitialBlockDownload

Function IsInitialBlockDownload

src/main.cpp:2636–2650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2634}
2635
2636bool IsInitialBlockDownload() {
2637 LOCK(cs_main);
2638 if (SysCfg().IsImporting() ||
2639 SysCfg().IsReindex())
2640 return true;
2641
2642 static int64_t nLastUpdate;
2643 static CBlockIndex *pIndexLastBest;
2644 if (chainActive.Tip() != pIndexLastBest) {
2645 pIndexLastBest = chainActive.Tip();
2646 nLastUpdate = GetTime();
2647 }
2648
2649 return (GetTime() - nLastUpdate < 10 && chainActive.Tip()->GetBlockTime() < GetTime() - 24 * 60 * 60);
2650}

Callers 12

WriteChainStateFunction · 0.85
UpdateTipFunction · 0.85
ActivateBestChainFunction · 0.85
SendMessagesFunction · 0.85
ProcessVersionMessageFunction · 0.85
ProcessTxMessageFunction · 0.85
WriteBlockToDiskFunction · 0.85
WriteToDiskMethod · 0.85
get_node_stateFunction · 0.85
BroadcastBlockFinalityFunction · 0.85
BroadcastBlockConfirmFunction · 0.85

Calls 5

GetTimeFunction · 0.85
IsImportingMethod · 0.80
IsReindexMethod · 0.80
TipMethod · 0.80
GetBlockTimeMethod · 0.45

Tested by

no test coverage detected