Browse Source

test: p2p.seeds and p2p.pex

pull/484/head
Ethan Buchman 8 years ago
parent
commit
fb9d3842e4
5 changed files with 7 additions and 7 deletions
  1. +1
    -1
      test/p2p/README.md
  2. +1
    -1
      test/p2p/data/core/init.sh
  3. +1
    -1
      test/p2p/fast_sync/test_peer.sh
  4. +2
    -2
      test/p2p/local_testnet_start.sh
  5. +2
    -2
      test/p2p/pex/test_addrbook.sh

+ 1
- 1
test/p2p/README.md View File

@ -38,7 +38,7 @@ for i in $(seq 1 4); do
--name local_testnet_$i \ --name local_testnet_$i \
--entrypoint tendermint \ --entrypoint tendermint \
-e TMHOME=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$i/core \ -e TMHOME=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$i/core \
tendermint_tester node --seeds 172.57.0.101:46656,172.57.0.102:46656,172.57.0.103:46656,172.57.0.104:46656 --proxy_app=dummy
tendermint_tester node --p2p.seeds 172.57.0.101:46656,172.57.0.102:46656,172.57.0.103:46656,172.57.0.104:46656 --proxy_app=dummy
done done
``` ```


+ 1
- 1
test/p2p/data/core/init.sh View File

@ -17,4 +17,4 @@ git fetch origin $BRANCH
git checkout $BRANCH git checkout $BRANCH
make install make install
tendermint node --seeds="$TMSEEDS" --moniker="$TMNAME" --proxy_app="$PROXYAPP"
tendermint node --p2p.seeds="$TMSEEDS" --moniker="$TMNAME" --proxy_app="$PROXYAPP"

+ 1
- 1
test/p2p/fast_sync/test_peer.sh View File

@ -27,7 +27,7 @@ SEEDS="$(test/p2p/ip.sh 1):46656"
for j in `seq 2 $N`; do for j in `seq 2 $N`; do
SEEDS="$SEEDS,$(test/p2p/ip.sh $j):46656" SEEDS="$SEEDS,$(test/p2p/ip.sh $j):46656"
done done
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $ID $PROXY_APP "--seeds $SEEDS --pex"
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $ID $PROXY_APP "--p2p.seeds $SEEDS --p2p.pex"
# wait for peer to sync and check the app hash # wait for peer to sync and check the app hash
bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME fs_$ID "test/p2p/fast_sync/check_peer.sh $ID" bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME fs_$ID "test/p2p/fast_sync/check_peer.sh $ID"


+ 2
- 2
test/p2p/local_testnet_start.sh View File

@ -10,7 +10,7 @@ set +u
SEEDS=$5 SEEDS=$5
if [[ "$SEEDS" != "" ]]; then if [[ "$SEEDS" != "" ]]; then
echo "Seeds: $SEEDS" echo "Seeds: $SEEDS"
SEEDS="--seeds $SEEDS"
SEEDS="--p2p.seeds $SEEDS"
fi fi
set -u set -u
@ -20,5 +20,5 @@ cd "$GOPATH/src/github.com/tendermint/tendermint"
docker network create --driver bridge --subnet 172.57.0.0/16 "$NETWORK_NAME" docker network create --driver bridge --subnet 172.57.0.0/16 "$NETWORK_NAME"
for i in $(seq 1 "$N"); do for i in $(seq 1 "$N"); do
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$i" "$APP_PROXY" "$SEEDS --pex"
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$i" "$APP_PROXY" "$SEEDS --p2p.pex"
done done

+ 2
- 2
test/p2p/pex/test_addrbook.sh View File

@ -23,7 +23,7 @@ docker rm -vf "local_testnet_$ID"
set -e set -e
# NOTE that we do not provide seeds # NOTE that we do not provide seeds
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--pex"
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--p2p.pex"
docker cp "/tmp/addrbook.json" "local_testnet_$ID:/go/src/github.com/tendermint/tendermint/test/p2p/data/mach1/core/addrbook.json" docker cp "/tmp/addrbook.json" "local_testnet_$ID:/go/src/github.com/tendermint/tendermint/test/p2p/data/mach1/core/addrbook.json"
echo "with the following addrbook:" echo "with the following addrbook:"
cat /tmp/addrbook.json cat /tmp/addrbook.json
@ -47,7 +47,7 @@ docker rm -vf "local_testnet_$ID"
set -e set -e
# NOTE that we do not provide seeds # NOTE that we do not provide seeds
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--pex"
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--p2p.pex"
# if the client runs forever, it means other peers have removed us from their books (which should not happen) # if the client runs forever, it means other peers have removed us from their books (which should not happen)
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N" bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N"


Loading…
Cancel
Save