From a6f55aa0ee5ddb57ccda1b63bec46b79db439178 Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Wed, 31 Jan 2024 01:02:19 +0530 Subject: [PATCH] fix: parachain artifact name conflict --- parachain/parachain.star | 2 +- parachain/register-para-id.star | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parachain/parachain.star b/parachain/parachain.star index b06fd76..3de909a 100644 --- a/parachain/parachain.star +++ b/parachain/parachain.star @@ -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) diff --git a/parachain/register-para-id.star b/parachain/register-para-id.star index 013b2f8..1b3e75d 100644 --- a/parachain/register-para-id.star +++ b/parachain/register-para-id.star @@ -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", @@ -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