mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Correct difficulty target passsed to getNewDifficultyTarget - was received rather than previous value
This commit is contained in:
@@ -211,7 +211,7 @@ public abstract class AbstractDogecoinParams extends NetworkParameters implement
|
|||||||
Block blockIntervalAgo = cursor.getHeader();
|
Block blockIntervalAgo = cursor.getHeader();
|
||||||
long receivedTargetCompact = nextBlock.getDifficultyTarget();
|
long receivedTargetCompact = nextBlock.getDifficultyTarget();
|
||||||
long newTargetCompact = this.getNewDifficultyTarget(previousHeight, prev.getTimeSeconds(),
|
long newTargetCompact = this.getNewDifficultyTarget(previousHeight, prev.getTimeSeconds(),
|
||||||
receivedTargetCompact, blockIntervalAgo.getTimeSeconds());
|
prev.getDifficultyTarget(), blockIntervalAgo.getTimeSeconds());
|
||||||
|
|
||||||
if (newTargetCompact != receivedTargetCompact)
|
if (newTargetCompact != receivedTargetCompact)
|
||||||
throw new VerificationException("Network provided difficulty bits do not match what was calculated: " +
|
throw new VerificationException("Network provided difficulty bits do not match what was calculated: " +
|
||||||
|
Reference in New Issue
Block a user