github.com/evdatsion/aphelion-dpos-bft@v0.32.1/test/p2p/pex/dial_peers.sh (about) 1 #! /bin/bash 2 set -u 3 4 N=$1 5 PEERS=$2 6 7 cd "$GOPATH/src/github.com/evdatsion/aphelion-dpos-bft" 8 9 echo "Waiting for nodes to come online" 10 for i in $(seq 1 "$N"); do 11 addr=$(test/p2p/ip.sh "$i"):26657 12 curl -s "$addr/status" > /dev/null 13 ERR=$? 14 while [ "$ERR" != 0 ]; do 15 sleep 1 16 curl -s "$addr/status" > /dev/null 17 ERR=$? 18 done 19 echo "... node $i is up" 20 done 21 22 IP=$(test/p2p/ip.sh 1) 23 curl "$IP:26657/dial_peers?persistent=true&peers=\\[$PEERS\\]"