Skip to content

Commit c51e730

Browse files
author
acer-king
committedSep 5, 2024
fix: revert refreshing method
1 parent 66b4d00 commit c51e730

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed
 

‎validators/services/bittensor.py

-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ def __init__(self):
1818
self.my_uid = self.metagraph.hotkeys.index(self.wallet.hotkey.ss58_address)
1919
self.check_wallet_registered_in_network()
2020

21-
def refresh(self):
22-
self.wallet = bt.wallet(config=self.config)
23-
self.subtensor = bt.subtensor(config=self.config, network=self.config.subtensor.network)
24-
self.metagraph = self.subtensor.metagraph(netuid=self.config.netuid)
25-
self.axon = bt.axon(wallet=self.wallet, port=self.config.axon.port)
26-
self.dendrite = bt.dendrite(wallet=self.wallet)
27-
self.my_uid = self.metagraph.hotkeys.index(self.wallet.hotkey.ss58_address)
2821

2922
def check_wallet_registered_in_network(self):
3023
if self.wallet.hotkey.ss58_address not in self.metagraph.hotkeys:

‎validators/weight_setter.py

-10
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,9 @@ def select_validator():
231231
else:
232232
bt.logging.info("image_validator is selected.")
233233
return image_validator
234-
def refresh(self):
235-
bt.refresh()
236-
self.dendrite = bt.dendrite
237-
self.subtensor = bt.subtensor
238-
self.wallet = bt.wallet
239-
self.moving_average_scores = None
240-
self.axon = bt.axon
241-
self.metagraph = bt.metagraph
242-
self.my_uid = bt.my_uid
243234

244235
async def get_available_uids(self):
245236
"""Get a dictionary of available UIDs and their axons asynchronously."""
246-
self.refresh()
247237
tasks = {uid.item(): self.check_uid(self.metagraph.axons[uid.item()], uid.item()) for uid in
248238
self.metagraph.uids}
249239
results = await asyncio.gather(*tasks.values())

0 commit comments

Comments
 (0)