mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01: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 {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user