tendermint/test/p2p/local_testnet_start.sh

25 lines
434 B
Bash
Raw Normal View History

2016-07-24 11:08:47 -07:00
#! /bin/bash
set -eu
DOCKER_IMAGE=$1
NETWORK_NAME=$2
2016-12-12 13:00:21 -08:00
N=$3
APP_PROXY=$4
2016-07-24 11:08:47 -07:00
2017-03-05 20:12:27 -08:00
set +u
SEEDS=$5
if [[ "$SEEDS" != "" ]]; then
echo "Seeds: $SEEDS"
SEEDS="--seeds $SEEDS"
fi
set -u
2016-07-24 11:08:47 -07:00
cd $GOPATH/src/github.com/tendermint/tendermint
# create docker network
docker network create --driver bridge --subnet 172.57.0.0/16 $NETWORK_NAME
for i in `seq 1 $N`; do
2017-03-05 20:12:27 -08:00
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $i $APP_PROXY "$SEEDS --pex"
2016-07-24 11:08:47 -07:00
done