Skip to content

Commit

Permalink
fix: separate nchainz config/chains and config/paths (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Feb 5, 2021
1 parent d213300 commit 4ff60fb
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 4ff60fb

Please sign in to comment.