Skip to content

Commit

Permalink
Merge pull request #2166 from IntersectMBO/match_literal_hash
Browse files Browse the repository at this point in the history
Match literal hash values
  • Loading branch information
mkoura authored Jan 12, 2024
2 parents de1f29b + aa71e22 commit 744c559
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions cardano_node_tests/tests/tests_conway/test_drep.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def test_register_and_retire_drep(
metadata_anchor = reg_drep_state[0][1]["anchor"]
assert (
metadata_anchor["dataHash"]
== drep_metadata_hash
== "592e53f74765c8c6c97dfda2fd6038236ffc7ad55800592118d9e36ad1c8140d"
), "Unexpected metadata hash"
assert metadata_anchor["url"] == drep_metadata_url, "Unexpected metadata url"
Expand Down
9 changes: 6 additions & 3 deletions cardano_node_tests/tests/tests_conway/test_voting.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ def test_constitution(
"ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit "
"in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia "
"deserunt mollit anim id est laborum. "
f"{clusterlib.get_rand_str(8)}"
"deserunt mollit anim id est laborum."
)
with open(constitution_file, "w", encoding="utf-8") as out_fp:
out_fp.write(constitution_text)
Expand Down Expand Up @@ -354,7 +353,11 @@ def _cast_vote(approve: bool, vote_id: str, add_spo_votes: bool = False) -> None

def _check_state(state: dict):
anchor = state["constitution"]["anchor"]
assert anchor["dataHash"] == constitution_hash, "Incorrect constitution anchor hash"
assert (
anchor["dataHash"]
== constitution_hash
== "d6d9034f61e2f7ada6e58c252e15684c8df7f0b197a95d80f42ca0a3685de26e"
), "Incorrect constitution anchor hash"
assert anchor["url"] == constitution_url, "Incorrect constitution anchor URL"

# Check ratification
Expand Down

0 comments on commit 744c559

Please sign in to comment.