Skip to content

Commit

Permalink
Add new score reporting to cost coverage test (#72)
Browse files Browse the repository at this point in the history
Fixes #71 by adding one more case to an `if ... else` block.

This was tested locally for specific hashes (e.g.
`0x71cefc37510c2e00e4d345c0cf84afc7dfd0f397f39275211ea662e355a1fb6e`)
where the test failed before.
  • Loading branch information
fhenneke authored Oct 2, 2023
1 parent d288276 commit e125f1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/monitoring_tests/cost_coverage_per_solver_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def cost_coverage(self, competition_data: dict[str, Any], gas_cost: float) -> bo
ref_score_str = second_best_sol["score"]
elif "scoreDiscounted" in second_best_sol:
ref_score_str = second_best_sol["scoreDiscounted"]
elif "scoreProtocolWithSolverRisk" in second_best_sol:
ref_score_str = second_best_sol["scoreProtocolWithSolverRisk"]
else:
ref_score_str = second_best_sol["scoreProtocol"]
ref_score = float(int(ref_score_str) / 10**18)
Expand Down

0 comments on commit e125f1b

Please sign in to comment.