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.

32 lines
585 B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. #! /bin/bash
  2. set -u
  3. N=$1
  4. cd $GOPATH/src/github.com/tendermint/tendermint
  5. echo "Waiting for nodes to come online"
  6. for i in `seq 1 $N`; do
  7. addr=$(test/p2p/ip.sh $i):46657
  8. curl -s $addr/status > /dev/null
  9. ERR=$?
  10. while [ "$ERR" != 0 ]; do
  11. sleep 1
  12. curl -s $addr/status > /dev/null
  13. ERR=$?
  14. done
  15. echo "... node $i is up"
  16. done
  17. set -e
  18. # peers need quotes
  19. peers="\"$(test/p2p/ip.sh 1):46656\""
  20. for i in `seq 2 $N`; do
  21. peers="$peers,\"$(test/p2p/ip.sh $i):46656\""
  22. done
  23. echo $peers
  24. echo $peers
  25. IP=$(test/p2p/ip.sh 1)
  26. curl "$IP:46657/dial_peers?persistent=true&peers=\[$peers\]"