diff --git a/Libplanet/HashDigest.cs b/Libplanet/HashDigest.cs index 08f9b09c8f..889ef33cd1 100644 --- a/Libplanet/HashDigest.cs +++ b/Libplanet/HashDigest.cs @@ -163,8 +163,8 @@ public bool LessThanTarget(long difficulty) return true; } - var target = new BigInteger( - Math.Pow(2, 256) / difficulty); + double maxTarget = Math.Pow(2, 256); + var target = new BigInteger(maxTarget / difficulty); // Add zero to convert unsigned BigInteger var result = new BigInteger(ByteArray.Add(0).ToArray());