Skip to content

Commit ca7effa

Browse files
Add comment about ASERT reference block
1 parent 08776e7 commit ca7effa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ unsigned int AverageTargetASERT(const CBlockIndex* pindexLast, const CBlockHeade
249249
if (nHeight < nASERTStartHeight)
250250
return WeightedTargetExponentialMovingAverage(pindexLast, pblock, params);
251251

252-
const uint32_t nBlocksPassed = (fProofOfStake ? pindexLast->nHeightPoS : pindexLast->nHeightPoW) + 1; // Account for the ASERT reference block by adding one to the height
252+
const uint32_t nBlocksPassed = (fProofOfStake ? pindexLast->nHeightPoS : pindexLast->nHeightPoW) + 1; // Account for the ASERT reference block (when it is the genesis block at height 0) by adding one to the height
253253

254254
// Using a static variable concurrently in this context is safe and will not cause a race condition during initialization because C++11 guarantees that static variables will be initialized exactly once
255255
static const CBlockIndex* const pindexReferenceBlocks[CBlockHeader::AlgoType::ALGO_COUNT] = {

0 commit comments

Comments
 (0)