github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/test/p2p/local_testnet_start.sh (about)

     1  #! /bin/bash
     2  set -eu
     3  
     4  DOCKER_IMAGE=$1
     5  NETWORK_NAME=$2
     6  IPV=$3
     7  N=$4
     8  APP_PROXY=$5
     9  
    10  set +u
    11  PERSISTENT_PEERS=$6
    12  if [[ "$PERSISTENT_PEERS" != "" ]]; then
    13  	echo "PersistentPeers: $PERSISTENT_PEERS"
    14  	PERSISTENT_PEERS="--p2p.persistent_peers $PERSISTENT_PEERS"
    15  fi
    16  set -u
    17  
    18  # create docker network
    19  if [[ $IPV == 6 ]]; then
    20  	docker network create --driver bridge --ipv6 --subnet fd80:b10c::/48 "$NETWORK_NAME"
    21  else
    22  	docker network create --driver bridge --subnet 172.57.0.0/16 "$NETWORK_NAME"
    23  fi
    24  
    25  for i in $(seq 1 "$N"); do
    26  	bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" $IPV "$i" "$APP_PROXY" "$PERSISTENT_PEERS --p2p.pex --rpc.unsafe"
    27  done