Skip to content

Commit

Permalink
Update rust sidechain start scripts, Update rust sidechain port values
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouscatsoserious authored and Marc Platt committed Jul 30, 2024
1 parent 88237e4 commit 86f7ca4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions chain_providers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
21 changes: 9 additions & 12 deletions models/chain_provider.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 86f7ca4

Please sign in to comment.