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