Skip to content

Commit 0b1ce3b

Browse files
authored
Update pow.cpp
1 parent b08f206 commit 0b1ce3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
187187
// Litecoin: This fixes an issue where a 51% attack can change difficulty at will.
188188
// Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz
189189
int blockstogoback = params.DifficultyAdjustmentInterval()-1;
190-
if ((pindexLast->nHeight+1) != params.DifficultyAdjustmentInterval())
190+
if ((pindexLast->nHeight+1) != params.DifficultyAdjustmentInterval()) // (pindexLast->nHeight+1) always > params.DifficultyAdjustmentInterval() So this is unnecessary
191191
blockstogoback = params.DifficultyAdjustmentInterval();
192192

193193
// Go back by what we want to be 14 days worth of blocks

0 commit comments

Comments
 (0)