Skip to content

Commit 6021496

Browse files
committed
fix
1 parent 55dd891 commit 6021496

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

neurons/validator.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,6 @@ def __init__(self):
106106
# Wallet holds cryptographic information, ensuring secure transactions and communication.
107107
# Activating Bittensor's logging with the set configurations.
108108
bt.logging(config=self.config, logging_dir=self.config.full_path)
109-
bt.logging.info(
110-
f"Running validator for subnet: {self.config.netuid} with autosync set to: {self.auto_sync} "
111-
f"on network: {self.config.subtensor.chain_endpoint} with config:"
112-
)
113-
114-
# This logs the active configuration to the specified logging directory for review.
115-
bt.logging.info(self.config)
116109

117110
# Initialize Bittensor miner objects
118111
# These classes are vital to interact and function within the Bittensor network.
@@ -132,6 +125,14 @@ def __init__(self):
132125
# Auto-sync disabled for mothership (it's the source of truth)
133126
self.auto_sync = getattr(self.config, 'autosync', False) and not self.is_mothership
134127

128+
bt.logging.info(
129+
f"Running validator for subnet: {self.config.netuid} with autosync set to: {self.auto_sync} "
130+
f"on network: {self.config.subtensor.chain_endpoint} with config:"
131+
)
132+
133+
# This logs the active configuration to the specified logging directory for review.
134+
bt.logging.info(self.config)
135+
135136
# Initialize Slack notifier for error reporting
136137
# Created before LivePriceFetcher so it can be passed for crash notifications
137138
self.slack_notifier = SlackNotifier(
@@ -239,6 +240,9 @@ def __init__(self):
239240
)
240241
exit()
241242

243+
# Get subtensor from subtensor_ops_manager before calling parent init
244+
self.subtensor = self.subtensor_ops_manager.get_subtensor()
245+
242246
# Build and link vali functions to the axon.
243247
# The axon handles request processing, allowing validators to send this process requests.
244248
# ValidatorBase creates its own clients internally (forward compatibility):

0 commit comments

Comments
 (0)