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.

31 lines
587 B

  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. # seeds need quotes
  19. seeds="\"$(test/p2p/ip.sh 1):46656\""
  20. for i in `seq 2 $N`; do
  21. seeds="$seeds,\"$(test/p2p/ip.sh $i):46656\""
  22. done
  23. echo $seeds
  24. echo $seeds
  25. IP=$(test/p2p/ip.sh 1)
  26. curl --data-urlencode "seeds=[$seeds]" "$IP:46657/dial_seeds"