Skip to content

Commit e94a4f0

Browse files
committed
Fix index selection on the run_collator script
1 parent 5ae843b commit e94a4f0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/run_collator.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ node_parachain_rpc_port="${NODE_PARACHAIN_RPC_PORT:-9944}"
2727
get_bootnode () {
2828
node="$1"
2929
port="$2"
30-
SELECT_INDEX=`[[ "$alice" == "127.0.0.1" ]] && echo "0" || echo "1"`
3130
curl -sS \
3231
-H 'Content-Type: application/json' \
3332
--data '{"id":1,"jsonrpc":"2.0","method":"system_localListenAddresses"}' \
34-
"$node:$port" |\
35-
tee |\
36-
jq -r '.result['$SELECT_INDEX'] // ""'
37-
33+
"$node:$port" | jq -r 'first((.result[] | select(test("127\\.0\\.0\\.1"))), .result[0]) // empty'
3834
}
3935

4036
bootnode_para () {

0 commit comments

Comments
 (0)