github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/test/p2p/pex/dial_peers.sh (about)

     1  #! /bin/bash
     2  set -u
     3  
     4  IPV=$1
     5  N=$2
     6  PEERS=$3
     7  
     8  echo "Waiting for nodes to come online"
     9  for i in $(seq 1 "$N"); do
    10  	addr=$(test/p2p/address.sh $IPV $i 26657)
    11  	curl -s "$addr/status" > /dev/null
    12  	ERR=$?
    13  	while [ "$ERR" != 0 ]; do
    14  		sleep 1
    15  		curl -s "$addr/status" > /dev/null
    16  		ERR=$?
    17  	done
    18  	echo "... node $i is up"
    19  done
    20  
    21  ADDR=$(test/p2p/address.sh $IPV 1 26657)
    22  curl "$ADDR/dial_peers?persistent=true&peers=\\[$PEERS\\]"