-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93bbb5b
commit af72b7d
Showing
10 changed files
with
714 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import json | ||
import sys | ||
import os | ||
import stat | ||
import subprocess | ||
|
||
bootnodes_base_path = "state-chain/node/bootnodes/" | ||
chainspecs_base_path = "state-chain/node/chainspecs/" | ||
|
||
# Set the first argument to variable network | ||
network = sys.argv[1] | ||
|
||
# Set the path of a binary file to variable binary | ||
binary = sys.argv[2] | ||
|
||
os.chmod(binary, stat.S_IXUSR) | ||
|
||
bootnodes_filename = bootnodes_base_path + network + ".txt" | ||
|
||
# Save contents of bootnodes file to variable | ||
with open(bootnodes_filename, "r") as bootnodes_data: | ||
bootnodes = bootnodes_data.read().splitlines() | ||
|
||
chainspec_filename = chainspecs_base_path + network + ".chainspec.json" | ||
|
||
generate_chainspec_subprocess=[binary, "build-spec", "--chain", network, "--disable-default-bootnode"] | ||
with open(chainspec_filename, "w") as chainspec: | ||
subprocess.call(generate_chainspec_subprocess, stdout=chainspec) | ||
|
||
# Load the chainspec file | ||
with open(chainspec_filename, "r") as chainspec: | ||
chainspec_data = json.load(chainspec) | ||
|
||
chainspec_data["bootNodes"] = bootnodes | ||
with open(chainspec_filename, "w") as chainspec: | ||
json.dump(chainspec_data, chainspec, indent=4) | ||
|
||
chainspec_filename_raw = chainspecs_base_path + network + ".chainspec.raw.json" | ||
|
||
generate_chainspec_raw_subprocess=[binary, "build-spec", "--chain", chainspec_filename, "--raw", "--disable-default-bootnode"] | ||
with open(chainspec_filename_raw, "w") as chainspec_raw: | ||
subprocess.call(generate_chainspec_raw_subprocess, stdout=chainspec_raw) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/ip4/165.232.114.128/tcp/30333/p2p/12D3KooWPFZo5JzqiWASDSrAtbyKgW2kw4Rb5FruE29PAhJ1u4xL | ||
/ip4/95.217.229.18/tcp/30333/p2p/12D3KooWAEq6VLm7FWzgyTxFwf8irsd3uEYoa1ZNoHmZAWgpkdfi | ||
/ip4/178.128.36.211/tcp/30333/p2p/12D3KooWMDs3oyT2YpQw88V7TdmN1dJa73D1jrfQorLaBovh7Kim | ||
/ip4/167.172.41.253/tcp/30333/p2p/12D3KooWGjx7vu1wB4xJwPZFbYj3rsVE9gW5eyMFcxRnYWu4sgtX |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
"/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs" | ||
/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs | ||
/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs | ||
/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs | ||
/ip4/206.81.20.229/tcp/30333/p2p/12D3KooWKiPoWsdTdG9XacrQZ5qyavsmSayGU4P969Qs6PipCNZs |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.