Skip to content

Commit

Permalink
Update pow.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
joshafest authored Feb 25, 2021
1 parent b08f206 commit 0b1ce3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// Litecoin: This fixes an issue where a 51% attack can change difficulty at will.
// Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz
int blockstogoback = params.DifficultyAdjustmentInterval()-1;
if ((pindexLast->nHeight+1) != params.DifficultyAdjustmentInterval())
if ((pindexLast->nHeight+1) != params.DifficultyAdjustmentInterval()) // (pindexLast->nHeight+1) always > params.DifficultyAdjustmentInterval() So this is unnecessary
blockstogoback = params.DifficultyAdjustmentInterval();

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

0 comments on commit 0b1ce3b

Please sign in to comment.