Skip to content

Commit

Permalink
refactor: remove unnecessary logs and return early
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantios committed Nov 29, 2024
1 parent 389284e commit eaf5844
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/valory/skills/decision_maker_abci/states/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,16 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]:

synced_data, event = cast(Tuple[SynchronizedData, Enum], res)

if event != Event.DONE:
return res

if synced_data.benchmarking_finished:
self.context.logger.info(
"No more markets to bet. The benchmarking has finished!"
)
return synced_data, Event.BENCHMARKING_FINISHED

if synced_data.simulated_day:
self.context.logger.info(
"Entering the sampling Round for a new simulated day"
)
# re-enter the SamplingRound
return synced_data, Event.NEW_SIMULATED_RESAMPLE
if event == Event.DONE and self.context.benchmarking_mode.enabled:

if self.context.benchmarking_mode.enabled:
return synced_data, Event.BENCHMARKING_ENABLED

return res

0 comments on commit eaf5844

Please sign in to comment.