Skip to content

Commit 5deb623

Browse files
committed
fix delete_collator
1 parent 6ca1982 commit 5deb623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ def delete_collator(self, args: list):
220220
return
221221

222222
deleted = False
223-
for sh in collators_list['shards']:
223+
for sh in collators_list['shards'].copy():
224224
if shard_id is None or sh['shard_id'] == shard_id:
225-
for c in sh['collators']:
225+
for c in sh['collators'].copy():
226226
if c['adnl_id'] == adnl:
227227
sh['collators'].remove(c)
228228
self.local.add_log(f'Removing collator {adnl} from shard {sh["shard_id"]}', 'info')

0 commit comments

Comments
 (0)