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.

17 lines
374 B

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