Skip to content

Commit 0d4f4f7

Browse files
committed
fix last details
1 parent cfcf07a commit 0d4f4f7

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

subvortex/core/core_bittensor/subtensor/subtensor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ async def get_axons(
248248
async def wait_for_block(
249249
subtensor: btcas.AsyncSubtensor,
250250
block: typing.Optional[int] = None,
251-
timeout: int = 60,
251+
timeout: int = 24, # Avg time of 2 blocks (1 block == 12 seconds)
252252
):
253253
"""
254254
Waits until the blockchain reaches the specified block number.
@@ -326,7 +326,8 @@ async def watchdog():
326326
await subtensor.substrate._reinstantiate_substrate()
327327

328328
if attempt > 0:
329-
await asyncio.sleep(1)
329+
# Wait avg time of a block
330+
await asyncio.sleep(12)
330331

331332
attempt += 1
332333

subvortex/validator/neuron/src/main.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -284,23 +284,7 @@ async def run(self):
284284
# Log event that have been reset if there are any
285285
if uids_reset.size > 0:
286286
log_event(self, uids_reset)
287-
288-
reset_info = []
289-
for uid in uids_reset:
290-
miner = next((m for m in self.miners if m.uid == uid), None)
291-
if miner:
292-
score = self.moving_scores[uid]
293-
reset_info.append(
294-
f"UID {uid} → Miner {miner}, Score: {score:.4f}"
295-
)
296-
else:
297-
reset_info.append(f"UID {uid} → Miner not found")
298-
299-
btul.logging.debug(f"UIDs reset:\n" + "\n".join(reset_info))
300-
301-
# Save in database
302-
await self.database.update_miners(miners=self.miners)
303-
btul.logging.debug(f"Saved miners #{len(self.miners)}")
287+
btul.logging.debug(f"UIDs reset: {uids_reset.tolist()}")
304288

305289
# Save state
306290
save_state(

0 commit comments

Comments
 (0)