From 86f7ca4384532864e2f4aab42efb70231d7e5110 Mon Sep 17 00:00:00 2001 From: seriouscatsoserious <121734574+seriouscatsoserious@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:28:08 -0500 Subject: [PATCH] Update rust sidechain start scripts, Update rust sidechain port values --- chain_providers.cfg | 6 +++--- models/chain_provider.gd | 21 +++++++++------------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/chain_providers.cfg b/chain_providers.cfg index 4b3fad3..0e071b3 100644 --- a/chain_providers.cfg +++ b/chain_providers.cfg @@ -84,7 +84,7 @@ wallet_dir_win="/data/plain_bitnames/wallet.mdb/" binary_zip_path_linux="bitnames-latest-x86_64-unknown-linux-gnu" binary_zip_path_win="bitnames-latest-x86_64-pc-windows-gnu.exe" binary_zip_path_mac="bitnames-latest-x86_64-apple-darwin" -port=19020 +port=6002 chain_type=1 slot=2 @@ -114,7 +114,7 @@ wallet_dir_win="/data/plain_bitassets/wallet.mdb" binary_zip_path_linux="bitassets-latest-x86_64-unknown-linux-gnu" binary_zip_path_win="bitassets-latest-x86_64-pc-windows-gnu.exe" binary_zip_path_mac="bitassets-latest-x86_64-apple-darwin" -port=19005 +port=6004 chain_type=1 slot=4 @@ -204,7 +204,7 @@ wallet_dir_win="/data/thunder/wallet.mdb" binary_zip_path_linux="thunder-latest-x86_64-unknown-linux-gnu" binary_zip_path_mac="thunder-latest-x86_64-apple-darwin" binary_zip_path_win="thunder-latest-x86_64-pc-windows-gnu.exe" -port=1910 +port=6009 chain_type=2 slot=9 diff --git a/models/chain_provider.gd b/models/chain_provider.gd index c42d6f7..4576366 100644 --- a/models/chain_provider.gd +++ b/models/chain_provider.gd @@ -141,31 +141,29 @@ func write_start_script(): var env = "" if id == "testsail" || id == "ethsail" || id == "zsail": - env = "SIDESAIL_DATADIR="+base_dir - + env = "SIDESAIL_DATADIR=" + base_dir + var cmd = get_executable_path() match id: - "thunder","bitnames","bitassets": + "thunder", "bitnames", "bitassets": var drivechain = Appstate.get_drivechain_provider() if drivechain == null: return - + + # Remove explicit network, mainchain RPC, and RPC port configurations var data_dir = " -d " + ProjectSettings.globalize_path(base_dir + "/data") - var net_addr = " -n " + "127.0.0.1:" + str(port * 2) - var dc_addr = " -m " + "127.0.0.1:" + str(drivechain.port) - var rpc_addr = " -r " + "127.0.0.1:" + str(port) var dc_user = " -u " + drivechain.rpc_user var dc_pass = " -p " + drivechain.rpc_password - cmd = cmd + data_dir + net_addr + dc_addr + dc_user + dc_pass + rpc_addr + cmd = cmd + data_dir + dc_user + dc_pass _: cmd = cmd + " --conf=" + get_conf_path() - + var file = FileAccess.open(get_start_path(), FileAccess.WRITE) match Appstate.get_platform(): Appstate.platform.LINUX: file.store_line("#!/bin/bash") if env != "": - file.store_line("export "+env) + file.store_link("export "+env) file.store_line(cmd) @@ -183,9 +181,8 @@ func write_start_script(): file.store_line("start " + cmd) - file.close() - + func write_dir(): var dir = ProjectSettings.globalize_path(base_dir)