BitSharper.Block.GetDifficultyTargetAsInteger C# (CSharp) Méthode

GetDifficultyTargetAsInteger() public méthode

Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash. Inside a block the target is represented using a compact form. If this form decodes to a value that is out of bounds, an exception is thrown.
public GetDifficultyTargetAsInteger ( ) : BigInteger
Résultat Org.BouncyCastle.Math.BigInteger
        public BigInteger GetDifficultyTargetAsInteger()
        {
            var target = Utils.DecodeCompactBits(_difficultyTarget);
            if (target.CompareTo(BigInteger.Zero) <= 0 || target.CompareTo(Params.ProofOfWorkLimit) > 0)
                throw new VerificationException("Difficulty target is bad: " + target);
            return target;
        }