diff --git a/neurons/validator.py b/neurons/validator.py index fb8e563c..2ded6e2e 100644 --- a/neurons/validator.py +++ b/neurons/validator.py @@ -385,9 +385,9 @@ def main(self): while not shutdown_dict: try: current_time = TimeUtil.now_in_millis() + self.weight_setter.set_weights(current_time=current_time) self.mdd_checker.mdd_check() self.challengeperiod_manager.refresh(current_time=current_time) - self.weight_setter.set_weights(current_time=current_time) self.elimination_manager.process_eliminations() self.position_syncer.sync_positions_with_cooldown(self.auto_sync) self.position_manager.position_locks.cleanup_locks(self.metagraph.hotkeys) diff --git a/vali_objects/utils/validator_sync_base.py b/vali_objects/utils/validator_sync_base.py index 5679e164..a919e0f0 100644 --- a/vali_objects/utils/validator_sync_base.py +++ b/vali_objects/utils/validator_sync_base.py @@ -199,7 +199,11 @@ def write_modifications(self, position_to_sync_status, stats): for position, sync_status in position_to_sync_status.items(): if sync_status == PositionSyncResult.NOTHING: kept_and_matched -= 1 - + if not self.is_mothership: + positions = self.split_position_on_flat(position) + for p in positions: + if p.is_open_position: + prev_open_position = self.close_older_open_position(p, prev_open_position) if kept_and_matched != 0: raise PositionSyncResultException(f"kept_and_matched: {kept_and_matched} stats {stats}")