Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 3,987 Lines • ▼ Show 20 Lines | bool ProcessNewBlockHeaders(const Config &config, | ||||
if (ppindex) { | if (ppindex) { | ||||
*ppindex = pindex; | *ppindex = pindex; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
NotifyHeaderTip(); | NotifyHeaderTip(); | ||||
{ | |||||
LOCK(cs_main); | |||||
if (::ChainstateActive().IsInitialBlockDownload() && ppindex && | |||||
*ppindex) { | |||||
LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", | |||||
(*ppindex)->nHeight, | |||||
100.0 / | |||||
((*ppindex)->nHeight + | |||||
(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / | |||||
Params().GetConsensus().nPowTargetSpacing) * | |||||
(*ppindex)->nHeight); | |||||
} | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
/** | /** | ||||
* Store block on disk. If dbp is non-nullptr, the file is known to already | * Store block on disk. If dbp is non-nullptr, the file is known to already | ||||
* reside on disk. | * reside on disk. | ||||
*/ | */ | ||||
static FlatFilePos SaveBlockToDisk(const CBlock &block, int nHeight, | static FlatFilePos SaveBlockToDisk(const CBlock &block, int nHeight, | ||||
▲ Show 20 Lines • Show All 1,794 Lines • Show Last 20 Lines |