Skip to content

Commit a5ffe14

Browse files
fix: seperate vc service names (ethereum#654)
Address ethereum#653 Adds 0-padding and indexes at 1 for vc_count.
1 parent 4272ff3 commit a5ffe14

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/participant_network.star

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ def launch_participant_network(
211211
vc_type = participant.vc_type
212212
index_str = shared_utils.zfill_custom(index + 1, len(str(len(participants))))
213213
for sub_index in range(participant.vc_count):
214+
vc_index_str = shared_utils.zfill_custom(
215+
sub_index + 1, len(str(participant.vc_count))
216+
)
214217
el_context = all_el_contexts[index]
215218
cl_context = all_cl_contexts[index]
216219

@@ -311,7 +314,7 @@ def launch_participant_network(
311314
index_str,
312315
cl_type,
313316
vc_type,
314-
"-" + str(sub_index) if participant.vc_count != 1 else "",
317+
"-" + vc_index_str if participant.vc_count != 1 else "",
315318
)
316319
snooper_beacon_context = beacon_snooper.launch(
317320
plan,
@@ -331,14 +334,14 @@ def launch_participant_network(
331334
el_type,
332335
cl_type,
333336
vc_type,
334-
"-" + str(sub_index) if participant.vc_count != 1 else "",
337+
"-" + vc_index_str if participant.vc_count != 1 else "",
335338
)
336339
if participant.cl_type != participant.vc_type
337340
else "{0}-{1}-{2}{3}".format(
338341
index_str,
339342
el_type,
340343
cl_type,
341-
"-" + str(sub_index) if participant.vc_count != 1 else "",
344+
"-" + vc_index_str if participant.vc_count != 1 else "",
342345
)
343346
)
344347

0 commit comments

Comments
 (0)