Skip to content

Commit

Permalink
Error handling when trades not closed within the same checkpoint (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng Lundquist authored Jan 24, 2024
1 parent a974133 commit f6b095f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/agent0/agent0/interactive_fuzz/fuzz_path_independence.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ def fuzz_path_independence(
continue

ending_checkpoint_id = interactive_hyperdrive.hyperdrive_interface.calc_checkpoint_id()
assert starting_checkpoint_id == ending_checkpoint_id
if starting_checkpoint_id != ending_checkpoint_id:
message = "Trades were not closed in the same checkpoint"
logging.warning(message)
rollbar_data = {"fuzz_random_seed": random_seed}
rollbar.report_message(message, "warning", extra_data=rollbar_data)
continue

# Check the reserve amounts; they should be unchanged now that all of the trades are closed
pool_state_df = interactive_hyperdrive.get_pool_state(coerce_float=False)
Expand Down

0 comments on commit f6b095f

Please sign in to comment.