Skip to content

Commit

Permalink
Change logging level for specific trades missing in fork fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
slundqui committed Nov 5, 2024
1 parent 63e7c91 commit 7eb82d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,14 @@ def _check_trades_made_on_pool(
error_message = ""
if pool.name not in trade_counts["hyperdrive_name"].values:
has_err = True
log_level = logging.ERROR
error_message = f"Pool {pool.name} did not make any trades after {iteration} iterations"
else:
# There may be cases where certain trades may not be possible
# (e.g., once we open a large trade, we can't add LP since we're not advancing
# time enough). Due to this, we only track these issues via warnings,
# where an actual pool without any trades is an error.
log_level = logging.WARNING
pool_trade_event_counts = trade_counts[trade_counts["hyperdrive_name"] == pool.name][
"event_type"
].values
Expand Down Expand Up @@ -210,7 +216,7 @@ def _check_trades_made_on_pool(
error_message = "FuzzBots: " + error_message
logging.error(error_message)
# We log message to get rollbar to group these messages together
log_rollbar_message(error_message, logging.ERROR)
log_rollbar_message(error_message, log_level)


def run_fuzz_bots(
Expand Down

0 comments on commit 7eb82d3

Please sign in to comment.