Skip to content

Commit

Permalink
fix: seperate vc service names (#654)
Browse files Browse the repository at this point in the history
Address #653 

Adds 0-padding and indexes at 1 for vc_count.
  • Loading branch information
0xTylerHolmes committed May 31, 2024
1 parent 4272ff3 commit a5ffe14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ def launch_participant_network(
vc_type = participant.vc_type
index_str = shared_utils.zfill_custom(index + 1, len(str(len(participants))))
for sub_index in range(participant.vc_count):
vc_index_str = shared_utils.zfill_custom(
sub_index + 1, len(str(participant.vc_count))
)
el_context = all_el_contexts[index]
cl_context = all_cl_contexts[index]

Expand Down Expand Up @@ -311,7 +314,7 @@ def launch_participant_network(
index_str,
cl_type,
vc_type,
"-" + str(sub_index) if participant.vc_count != 1 else "",
"-" + vc_index_str if participant.vc_count != 1 else "",
)
snooper_beacon_context = beacon_snooper.launch(
plan,
Expand All @@ -331,14 +334,14 @@ def launch_participant_network(
el_type,
cl_type,
vc_type,
"-" + str(sub_index) if participant.vc_count != 1 else "",
"-" + vc_index_str if participant.vc_count != 1 else "",
)
if participant.cl_type != participant.vc_type
else "{0}-{1}-{2}{3}".format(
index_str,
el_type,
cl_type,
"-" + str(sub_index) if participant.vc_count != 1 else "",
"-" + vc_index_str if participant.vc_count != 1 else "",
)
)

Expand Down

0 comments on commit a5ffe14

Please sign in to comment.