You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
391 B

  1. #! /bin/bash
  2. set -u
  3. IPV=$1
  4. ID=$2
  5. N=$3
  6. addr=$(test/p2p/address.sh $IPV "$ID" 26657)
  7. echo "2. wait until peer $ID connects to other nodes using pex reactor"
  8. peers_count="0"
  9. while [[ "$peers_count" -lt "$((N-1))" ]]; do
  10. sleep 1
  11. peers_count=$(curl -s "$addr/net_info" | jq ".result.peers | length")
  12. echo "... peers count = $peers_count, expected = $((N-1))"
  13. done
  14. echo "... successful"