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

fix: separate nchainz config/chains and config/paths #408

Merged
merged 1 commit into from
Feb 5, 2021
Merged
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
8 changes: 4 additions & 4 deletions scripts/nchainz
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ clients)
done
SEED=$(jq -r '.secret' "$f")
echo "Key $(rly keys restore $chainid testkey "$SEED") imported from $chainid to relayer..."
rly config add-paths "$BASEDIR/config/paths"

try=0
f="$DATA/$chainid/n0/$DAEMON/config/genesis.json"
Expand All @@ -491,6 +490,7 @@ clients)

# Let all our chains initialise.
wait
rly config add-paths "$BASEDIR/config/paths"

for i in ${!IDS[@]}; do
ID=${IDS[$i]}
Expand Down Expand Up @@ -619,7 +619,7 @@ if [[ -e $BASEDIR ]] && [[ $SKIP != yes ]]; then
fi

rm -rf "$BASEDIR"
mkdir -p "$BASEDIR/config" "$LOGS"
mkdir -p "$BASEDIR/config/paths" "$BASEDIR/config/chains" "$LOGS"

echo "creating $NCONFIG"
cat <<EOF >"$NCONFIG"
Expand All @@ -640,7 +640,7 @@ for i in ${!IDS[@]}; do
id=${IDS[$i]}
json=${JSONS[$i]}
p26657=$(( 26657 - $i * 100 ))
out="$BASEDIR/config/$id.json"
out="$BASEDIR/config/chains/$id.json"
echo "creating $out"
jq ".link + { \"chain-id\": \"$id\", \"rpc-addr\": \"http://localhost:$p26657\", \"key\": \"testkey\" }" "$json" \
> "$out"
Expand All @@ -654,7 +654,7 @@ for i in ${!SRCS[@]}; do
dstport=${DSTPORTS[$i]}

path="path-$i"
out="$BASEDIR/config/$path.json"
out="$BASEDIR/config/paths/$path.json"
echo "creating $out"
cat >"$out" <<EOF
{
Expand Down