3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Correct difficulty target passsed to getNewDifficultyTarget - was received rather than previous value

This commit is contained in:
Ross Nicoll 2015-10-16 19:31:30 +01:00
parent 805b78f060
commit a2499cb31a

View File

@ -211,7 +211,7 @@ public abstract class AbstractDogecoinParams extends NetworkParameters implement
Block blockIntervalAgo = cursor.getHeader();
long receivedTargetCompact = nextBlock.getDifficultyTarget();
long newTargetCompact = this.getNewDifficultyTarget(previousHeight, prev.getTimeSeconds(),
receivedTargetCompact, blockIntervalAgo.getTimeSeconds());
prev.getDifficultyTarget(), blockIntervalAgo.getTimeSeconds());
if (newTargetCompact != receivedTargetCompact)
throw new VerificationException("Network provided difficulty bits do not match what was calculated: " +