aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_utxo_set_hash.py
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2021-01-30 20:29:40 +0100
committerFabian Jahr <fjahr@protonmail.com>2021-01-30 20:33:23 +0100
commite987ae5a554c9952812746c29f2766bacea4b727 (patch)
tree64d1af378b15422c748948ea84cccfdc1122bf4a /test/functional/feature_utxo_set_hash.py
parent6ccc8fc067bf516cda7bc5d7d721945be5ac2003 (diff)
downloadbitcoin-e987ae5a554c9952812746c29f2766bacea4b727.tar.xz
test: Add test for deterministic UTXO set hash results
Diffstat (limited to 'test/functional/feature_utxo_set_hash.py')
-rwxr-xr-xtest/functional/feature_utxo_set_hash.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/feature_utxo_set_hash.py b/test/functional/feature_utxo_set_hash.py
index a8e6a2e753..6e6046d84d 100755
--- a/test/functional/feature_utxo_set_hash.py
+++ b/test/functional/feature_utxo_set_hash.py
@@ -24,6 +24,13 @@ class UTXOSetHashTest(BitcoinTestFramework):
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
+ def test_deterministic_hash_results(self):
+ self.log.info("Test deterministic UTXO set hash results")
+
+ # These depend on the setup_clean_chain option, the chain loaded from the cache
+ assert_equal(self.nodes[0].gettxoutsetinfo()['hash_serialized_2'], "b32ec1dda5a53cd025b95387aad344a801825fe46a60ff952ce26528f01d3be8")
+ assert_equal(self.nodes[0].gettxoutsetinfo("muhash")['muhash'], "dd5ad2a105c2d29495f577245c357409002329b9f4d6182c0af3dc2f462555c8")
+
def test_muhash_implementation(self):
self.log.info("Test MuHash implementation consistency")
@@ -71,6 +78,7 @@ class UTXOSetHashTest(BitcoinTestFramework):
assert_equal(finalized[::-1].hex(), node_muhash)
def run_test(self):
+ self.test_deterministic_hash_results()
self.test_muhash_implementation()