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.

24 lines
557 B

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=$2
  5. N=$3
  6. APP_PROXY=$4
  7. set +u
  8. PERSISTENT_PEERS=$5
  9. if [[ "$PERSISTENT_PEERS" != "" ]]; then
  10. echo "PersistentPeers: $PERSISTENT_PEERS"
  11. PERSISTENT_PEERS="--p2p.persistent_peers $PERSISTENT_PEERS"
  12. fi
  13. set -u
  14. cd "$GOPATH/src/github.com/tendermint/tendermint"
  15. # create docker network
  16. docker network create --driver bridge --subnet 172.57.0.0/16 "$NETWORK_NAME"
  17. for i in $(seq 1 "$N"); do
  18. bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$i" "$APP_PROXY" "$PERSISTENT_PEERS --p2p.pex --rpc.unsafe"
  19. done