Trivial cleanup

This commit is contained in:
Mike Hearn 2013-02-28 19:27:13 +01:00
parent 55898d3ee3
commit 559df0b3f8

View File

@ -578,7 +578,7 @@ public class Block extends Message {
public BigInteger getDifficultyTargetAsInteger() throws VerificationException {
maybeParseHeader();
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());
return target;
}