Skip to content

Commit

Permalink
Merge pull request #2493 from IntersectMBO/handle_def_values_pv2
Browse files Browse the repository at this point in the history
Handle default values for Plutus V2 cost model
  • Loading branch information
mkoura authored Jul 25, 2024
2 parents 27f3bed + d70463c commit aa0ae19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cardano_node_tests/tests/tests_plutus_v2/mint_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,15 @@ def _check_txout() -> None:

prot_params = cluster_obj.g_query.get_protocol_params()
prot_ver = prot_params["protocolVersion"]["major"]
cost_model_len = len(prot_params["costModels"]["PlutusV2"])
pv2_cost_model = prot_params["costModels"]["PlutusV2"]
cost_model_len = len(pv2_cost_model)

if prot_ver < 10:
assert "(MalformedScriptWitnesses" in err, err
elif cost_model_len < 185:
elif cost_model_len < 185 or pv2_cost_model[-1] == 9223372036854775807:
assert "overspending the budget" in err, err
else:
elif not err:
_check_txout()
else:
_msg = f"Unexpected error: {err}"
raise AssertionError(_msg)

0 comments on commit aa0ae19

Please sign in to comment.