Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
round_time_to_minutes,
)
from synth.utils.logging import setup_gcp_logging
from synth.utils.opening_hours import should_skip_xau
from synth.validator.forward import (
calculate_moving_average_and_update_rewards,
calculate_scores,
Expand Down Expand Up @@ -162,11 +161,6 @@ def select_asset(
latest_index = asset_list.index(latest_asset)
asset = asset_list[(latest_index + 1) % len(asset_list)]

future_start_time = get_current_time() + timedelta(seconds=delay)
future_start_time = round_time_to_minutes(future_start_time)
if should_skip_xau(future_start_time) and asset == "XAU":
asset = asset_list[(asset_list.index("XAU") + 1) % len(asset_list)]

return asset

def cycle_low_frequency(self, asset: str):
Expand Down Expand Up @@ -214,13 +208,6 @@ def forward_prompt(self, asset: str, prompt_config: PromptConfig):
request_time, prompt_config.timeout_extra_seconds
)

if should_skip_xau(start_time) and asset == "XAU":
bt.logging.info(
"Skipping XAU simulation as market is closed",
"forward_prompt",
)
return

simulation_input = SimulationInput(
asset=asset,
start_time=start_time.isoformat(),
Expand Down
24 changes: 0 additions & 24 deletions synth/utils/opening_hours.py

This file was deleted.

19 changes: 0 additions & 19 deletions tests/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,3 @@ def test_select_asset(self):
latest_asset, asset_list, 0
)
self.assertEqual(selected_asset, "LTC")

def test_select_asset_gold(self):
latest_asset = "ETH"
asset_list = ["BTC", "ETH", "XAU", "LTC"]

with patch(
"neurons.validator.get_current_time"
) as mock_get_current_time:
mock_get_current_time.return_value = datetime(
2025, 12, 3, 12, 36, 30, tzinfo=timezone.utc
)
with patch(
"neurons.validator.should_skip_xau"
) as mock_should_skip_xau:
mock_should_skip_xau.return_value = True
selected_asset = Validator.select_asset(
latest_asset, asset_list, 0
)
self.assertEqual(selected_asset, "LTC")