Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chain_providers.cfg #88

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading