diff --git a/src/monitoring_tests/combinatorial_auction_surplus_test.py b/src/monitoring_tests/combinatorial_auction_surplus_test.py index ad10d97..9c9eed5 100644 --- a/src/monitoring_tests/combinatorial_auction_surplus_test.py +++ b/src/monitoring_tests/combinatorial_auction_surplus_test.py @@ -135,7 +135,6 @@ def get_token_pairs_surplus( large costs. """ trades_dict = self.get_uid_trades(solution) - objective = solution["objective"]["total"] surplus_dict: dict[tuple[str, str], Fraction] = {} for uid in trades_dict: trade = trades_dict[uid] @@ -161,7 +160,10 @@ def get_token_pairs_surplus( # use the minimum of surplus and objective in case there is only one token pair if len(surplus_dict) == 1: for token_pair in surplus_dict: - surplus_dict[token_pair] = min(surplus_dict[token_pair], objective) + surplus_dict[token_pair] = min( + surplus_dict[token_pair], solution["objective"]["total"] + ) + # surplus_dict[token_pair] = solution["objective"]["total"] return surplus_dict diff --git a/tests/e2e/combinatorial_auction_surplus_test.py b/tests/e2e/combinatorial_auction_surplus_test.py index c47d95e..b3fa3fd 100644 --- a/tests/e2e/combinatorial_auction_surplus_test.py +++ b/tests/e2e/combinatorial_auction_surplus_test.py @@ -23,7 +23,9 @@ def test_surplus(self) -> None: # # combinatorial auction better than current auction # tx_hash = "0x46639ae0e516bcad7b052fb6bfb6227d0aa2707e9882dd8d86bab2ab6aeee155" # tx_hash = "0xe28b92ba73632d6b167fdb9bbfec10744ce208536901dd43379a6778c4408536" - tx_hash = "0xad0ede9fd68481b8ef4722d069598898e01d61427ccb378ca4c82c772c6644e0" + # tx_hash = "0xad0ede9fd68481b8ef4722d069598898e01d61427ccb378ca4c82c772c6644e0" + # tx_hash = "0xead8f01e8e24fdc306fca8fcac5146edc22c27e49a7aad6134adc2ad50ba8581" + tx_hash = "0x6200e744e5d6f9990271be53840c01044cc19f3a8526190e1eaac0bc5fefed85" self.assertTrue(surplus_test.run(tx_hash))