File tree Expand file tree Collapse file tree
core/core_bittensor/subtensor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ async def get_axons(
248248async 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
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments