diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index 42412ec49..4b57538e6 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -9,6 +9,7 @@ - submitblock""" import copy +import struct from binascii import b2a_hex from decimal import Decimal @@ -17,6 +18,13 @@ from test_framework.mininode import CBlock from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error +def uint256_from_str(s): + r = 0 + t = struct.unpack(" decimal => binary math is why we do this check # assert abs(difficulty * 2**31 - 1) < 0.0001 - assert abs(difficulty) < 0.0005 # Kevacoin change + assert abs(difficulty) < 2.0 # Kevacoin change def _test_getnetworkhashps(self): hashes_per_second = self.nodes[0].getnetworkhashps() diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index faec0beb6..e484e36ab 100644 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -633,8 +633,9 @@ class CBlockHeader(): c += ser_uint256(self.merkle_root) c += struct.pack("