From e125f1b6da5fadf5ae7b0c8df76e42c2c02115f0 Mon Sep 17 00:00:00 2001 From: Felix Henneke Date: Mon, 2 Oct 2023 15:13:31 +0200 Subject: [PATCH] Add new score reporting to cost coverage test (#72) 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. --- src/monitoring_tests/cost_coverage_per_solver_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monitoring_tests/cost_coverage_per_solver_test.py b/src/monitoring_tests/cost_coverage_per_solver_test.py index 8571efc..ed96726 100644 --- a/src/monitoring_tests/cost_coverage_per_solver_test.py +++ b/src/monitoring_tests/cost_coverage_per_solver_test.py @@ -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)