File tree Expand file tree Collapse file tree
subvortex/validator/neuron/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,15 +269,23 @@ async def run(self):
269269 moving_scores = self .moving_scores .copy (),
270270 )
271271
272+ # Build the list of uids reset
273+ uids_reset = np .flatnonzero (
274+ (self .moving_scores != 0 ) & (moving_scores == 0 )
275+ )
276+
277+ # Save the new moving scores
278+ self .moving_scores = moving_scores
279+
280+ # Save in database
281+ await self .database .update_miners (miners = self .miners )
282+ btul .logging .debug (f"Saved miners #{ len (self .miners )} " )
283+
272284 # Log event that have been reset if there are any
273- uids_reset = np .flatnonzero ((self .moving_scores != 0 ) & (moving_scores == 0 ))
274285 if uids_reset .size > 0 :
275286 log_event (self , uids_reset )
276287 btul .logging .debug (f"UIDs reset: { uids_reset .tolist ()} " )
277288
278- # Save the new moving scores
279- self .moving_scores = moving_scores
280-
281289 # Save in database
282290 await self .database .update_miners (miners = self .miners )
283291 btul .logging .debug (f"Saved miners #{ len (self .miners )} " )
You can’t perform that action at this time.
0 commit comments