Browse Source

Fixed rpc_blockchain test case.

cn
Jianping Wu 6 years ago
parent
commit
a51579a028
  1. 5
      test/functional/rpc_blockchain.py

5
test/functional/rpc_blockchain.py

@ -133,7 +133,7 @@ class BlockchainTest(BitcoinTestFramework): @@ -133,7 +133,7 @@ class BlockchainTest(BitcoinTestFramework):
node = self.nodes[0]
res = node.gettxoutsetinfo()
assert_equal(res['total_amount'], Decimal('8725.00000000'))
assert_equal(res['total_amount'], Decimal('87250.00000000'))
assert_equal(res['transactions'], 200)
assert_equal(res['height'], 200)
assert_equal(res['txouts'], 200)
@ -201,7 +201,8 @@ class BlockchainTest(BitcoinTestFramework): @@ -201,7 +201,8 @@ class BlockchainTest(BitcoinTestFramework):
difficulty = self.nodes[0].getdifficulty()
# 1 hash in 2 should be valid, so difficulty should be 1/2**31
# binary => decimal => binary math is why we do this check
assert abs(difficulty * 2**31 - 1) < 0.0001
# assert abs(difficulty * 2**31 - 1) < 0.0001
assert abs(difficulty) < 0.0005 # Kevacoin change
def _test_getnetworkhashps(self):
hashes_per_second = self.nodes[0].getnetworkhashps()

Loading…
Cancel
Save