Skip to content

Commit

Permalink
test: Add test for deterministic UTXO set hash results
Browse files Browse the repository at this point in the history
  • Loading branch information
fjahr committed Jan 30, 2021
1 parent 6ccc8fc commit e987ae5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/functional/feature_utxo_set_hash.py
Expand Up @@ -24,6 +24,13 @@ def set_test_params(self):
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")

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

def run_test(self):
self.test_deterministic_hash_results()
self.test_muhash_implementation()


Expand Down

0 comments on commit e987ae5

Please sign in to comment.