Skip to content

Commit

Permalink
fix: parachain artifact name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
shanithkk committed Jan 30, 2024
1 parent 3e477bb commit a6f55aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parachain/parachain.star
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def start_nodes(plan, chain_type, parachains, relay_chain_ip):
final_parachain_details = {}

for parachain in parachains:
para_id = register_para_slot.register_para_id(plan, relay_chain_ip)
para_id = register_para_slot.register_para_id(plan, relay_chain_ip, parachain["name"])
parachain_details = start_local_parachain_node(plan, chain_type, parachain, para_id)
register_para_slot.onboard_genesis_state_and_wasm(plan, para_id, parachain["name"], relay_chain_ip)
final_parachain_details.update(parachain_details)
Expand Down
6 changes: 3 additions & 3 deletions parachain/register-para-id.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build_spec = import_module("../package_io/build-spec.star")
constant = import_module("../package_io/constant.star")

def register_para_id(plan, alice_ip):
def register_para_id(plan, alice_ip, chain_name):
files = {
"/app": "configs",
"/build": "javascript",
Expand All @@ -11,14 +11,14 @@ def register_para_id(plan, alice_ip):
run = "cd /build && npm i && node register ws://{0}:9944 //Alice".format(alice_ip),
image = constant.NODE_IMAGE,
files = files,
store = [StoreSpec(src = "/tmp/para.json", name = "parathread_id")],
store = [StoreSpec(src = "/tmp/para.json", name = "parathread_id_{}".format(chain_name))],
)

id = plan.run_sh(
run = "cat /build/para.json | tr -d '\n\r'",
image = "badouralix/curl-jq",
files = {
"/build": "parathread_id",
"/build": "parathread_id_{}".format(chain_name),
},
)
return id.output
Expand Down

0 comments on commit a6f55aa

Please sign in to comment.