Skip to content

Commit 911f153

Browse files
committed
Fix double open
1 parent 612d9d5 commit 911f153

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vali_objects/utils/validator_sync_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ def write_modifications(self, position_to_sync_status, stats):
199199
for position, sync_status in position_to_sync_status.items():
200200
if sync_status == PositionSyncResult.NOTHING:
201201
kept_and_matched -= 1
202-
202+
if not self.is_mothership:
203+
positions = self.split_position_on_flat(position)
204+
for p in positions:
205+
if p.is_open_position:
206+
prev_open_position = self.close_older_open_position(p, prev_open_position)
203207

204208
if kept_and_matched != 0:
205209
raise PositionSyncResultException(f"kept_and_matched: {kept_and_matched} stats {stats}")

0 commit comments

Comments
 (0)