From a51579a028f032d610a0fec393361a9fca495c50 Mon Sep 17 00:00:00 2001 From: Jianping Wu Date: Thu, 7 Feb 2019 15:21:01 -0800 Subject: [PATCH] Fixed rpc_blockchain test case. --- test/functional/rpc_blockchain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 68386ca0d..515eed56c 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -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): 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()