Skip to content

Commit e987ae5

Browse files
committed
test: Add test for deterministic UTXO set hash results
1 parent 6ccc8fc commit e987ae5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/feature_utxo_set_hash.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ def set_test_params(self):
2424
def skip_test_if_missing_module(self):
2525
self.skip_if_no_wallet()
2626

27+
def test_deterministic_hash_results(self):
28+
self.log.info("Test deterministic UTXO set hash results")
29+
30+
# These depend on the setup_clean_chain option, the chain loaded from the cache
31+
assert_equal(self.nodes[0].gettxoutsetinfo()['hash_serialized_2'], "b32ec1dda5a53cd025b95387aad344a801825fe46a60ff952ce26528f01d3be8")
32+
assert_equal(self.nodes[0].gettxoutsetinfo("muhash")['muhash'], "dd5ad2a105c2d29495f577245c357409002329b9f4d6182c0af3dc2f462555c8")
33+
2734
def test_muhash_implementation(self):
2835
self.log.info("Test MuHash implementation consistency")
2936

@@ -71,6 +78,7 @@ def test_muhash_implementation(self):
7178
assert_equal(finalized[::-1].hex(), node_muhash)
7279

7380
def run_test(self):
81+
self.test_deterministic_hash_results()
7482
self.test_muhash_implementation()
7583

7684

0 commit comments

Comments
 (0)