mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-11 17:55:53 +00:00
Trivial cleanup
This commit is contained in:
parent
55898d3ee3
commit
559df0b3f8
@ -578,7 +578,7 @@ public class Block extends Message {
|
|||||||
public BigInteger getDifficultyTargetAsInteger() throws VerificationException {
|
public BigInteger getDifficultyTargetAsInteger() throws VerificationException {
|
||||||
maybeParseHeader();
|
maybeParseHeader();
|
||||||
BigInteger target = Utils.decodeCompactBits(difficultyTarget);
|
BigInteger target = Utils.decodeCompactBits(difficultyTarget);
|
||||||
if (target.compareTo(BigInteger.valueOf(0)) <= 0 || target.compareTo(params.proofOfWorkLimit) > 0)
|
if (target.compareTo(BigInteger.ZERO) <= 0 || target.compareTo(params.proofOfWorkLimit) > 0)
|
||||||
throw new VerificationException("Difficulty target is bad: " + target.toString());
|
throw new VerificationException("Difficulty target is bad: " + target.toString());
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user