@@ -19,6 +19,7 @@ NUM_SOLOS=1
19
19
real0=$( readlink " ${BASH_SOURCE[0]} " || echo " ${BASH_SOURCE[0]} " )
20
20
thisdir=$( cd " $( dirname -- " $real0 " ) " && pwd -P)
21
21
22
+ PATHCONFIG=nchainz/config/paths
22
23
CLI=ag-cosmos-helper
23
24
DAEMON=ag-chain-cosmos
24
25
SOLO=$thisdir /ag-solo
@@ -170,12 +171,12 @@ start-relayer)
170
171
# Extract existing config.
171
172
for path in $( jq ' .paths | keys | .[]' " $cfgfile " ) ; do
172
173
rawpath=$( echo " $path " | jq -r .)
173
- jq -r " .paths[$path ]" " $cfgfile " > " nchainz/config /$rawpath .json"
174
+ jq -r " .paths[$path ]" " $cfgfile " > " $PATHCONFIG /$rawpath .json"
174
175
done
175
176
176
177
jqexpr=
177
- for fname in nchainz/config /* .json; do
178
- [[ -z $template || $fname == " nchainz/config /$template .json" ]] || continue
178
+ for fname in $PATHCONFIG /* .json; do
179
+ [[ -z $template || $fname == " $PATHCONFIG /$template .json" ]] || continue
179
180
[[ $fname =~ $BASE_RE ]] || continue
180
181
if grep -q ' "generator": "ag-nchainz"' " $fname " ; then :
181
182
else
@@ -200,9 +201,9 @@ start-relayer)
200
201
201
202
if [[ -z $jqexpr ]]; then
202
203
if [[ -n $template ]]; then
203
- echo 1>&2 " Connection ID \` $srccid ' is not defined in nchainz/config /$template .json"
204
+ echo 1>&2 " Connection ID \` $srccid ' is not defined in $PATHCONFIG /$template .json"
204
205
else
205
- echo 1>&2 " Connection ID \` $srccid ' is not defined in nchainz/config /*.json"
206
+ echo 1>&2 " Connection ID \` $srccid ' is not defined in $PATHCONFIG /*.json"
206
207
fi
207
208
exit 1
208
209
fi
@@ -215,23 +216,23 @@ start-relayer)
215
216
echo " Replacing path \` $path '"
216
217
path=$template
217
218
jq -s " $jqexpr " \
218
- " nchainz/config/ $template .json" " $tmpfile " > " nchainz/config /$path .json"
219
+ " $PATHCONFIG / $template .json" " $tmpfile " > " $PATHCONFIG /$path .json"
219
220
else
220
221
# Create a new path.
221
222
i=0
222
223
path=path-$i
223
- while [[ -e " nchainz/config /$path .json" ]]; do
224
+ while [[ -e " $PATHCONFIG /$path .json" ]]; do
224
225
i=$(( $i + 1 ))
225
226
path=path-$i
226
227
done
227
228
228
229
echo " Creating new path \` $path '"
229
230
jq -s " $jqexpr " ' * { "generator": "ag-nchainz" }' \
230
- " nchainz/config/ $template .json" " $tmpfile " > " nchainz/config /$path .json"
231
+ " $PATHCONFIG / $template .json" " $tmpfile " > " $PATHCONFIG /$path .json"
231
232
fi
232
233
233
- echo " $ rly config add-dir nchainz/config /"
234
- rly config add-dir nchainz/config /
234
+ echo " $ rly config add-paths $PATHCONFIG /"
235
+ rly config add-paths $PATHCONFIG /
235
236
236
237
try=0
237
238
while ! rly tx link $path --timeout=3s -d >> " nchainz/logs/$path .log" 2>&1 ; do
0 commit comments