mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 21:31:23 +00:00
Fix test/p2p/pex circle tests; update consensus
This commit is contained in:
@ -15,9 +15,7 @@ echo "starting tendermint peer ID=$ID"
|
||||
# NOTE: $NODE_FLAGS should be unescaped (no quotes). otherwise it will be
|
||||
# treated as one flag.
|
||||
|
||||
|
||||
|
||||
if [[ "$ID" == "1" ]]; then
|
||||
if [[ "$ID" == "x" ]]; then # Set "x" to "1" to print to console.
|
||||
docker run \
|
||||
--net="$NETWORK_NAME" \
|
||||
--ip=$(test/p2p/ip.sh "$ID") \
|
||||
|
@ -16,6 +16,7 @@ CLIENT_NAME="pex_addrbook_$ID"
|
||||
|
||||
echo "1. restart peer $ID"
|
||||
docker stop "local_testnet_$ID"
|
||||
echo "stopped local_testnet_$ID"
|
||||
# preserve addrbook.json
|
||||
docker cp "local_testnet_$ID:/go/src/github.com/tendermint/tendermint/test/p2p/data/mach1/core/config/addrbook.json" "/tmp/addrbook.json"
|
||||
set +e #CIRCLE
|
||||
@ -24,6 +25,13 @@ set -e
|
||||
|
||||
# NOTE that we do not provide persistent_peers
|
||||
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--p2p.pex --rpc.unsafe"
|
||||
echo "started local_testnet_$ID"
|
||||
|
||||
# if the client runs forever, it means addrbook wasn't saved or was empty
|
||||
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N"
|
||||
|
||||
# Now we know that the node is up.
|
||||
|
||||
docker cp "/tmp/addrbook.json" "local_testnet_$ID:/go/src/github.com/tendermint/tendermint/test/p2p/data/mach1/core/config/addrbook.json"
|
||||
echo "with the following addrbook:"
|
||||
cat /tmp/addrbook.json
|
||||
@ -31,9 +39,6 @@ cat /tmp/addrbook.json
|
||||
# docker exec "local_testnet_$ID" cat "/go/src/github.com/tendermint/tendermint/test/p2p/data/mach1/core/config/addrbook.json"
|
||||
echo ""
|
||||
|
||||
# if the client runs forever, it means addrbook wasn't saved or was empty
|
||||
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N"
|
||||
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "Testing other peers connect to us if we have neither persistent_peers nor the addrbook"
|
||||
echo "(assuming peers are started with pex enabled)"
|
||||
@ -42,16 +47,20 @@ CLIENT_NAME="pex_no_addrbook_$ID"
|
||||
|
||||
echo "1. restart peer $ID"
|
||||
docker stop "local_testnet_$ID"
|
||||
echo "stopped local_testnet_$ID"
|
||||
set +e #CIRCLE
|
||||
docker rm -vf "local_testnet_$ID"
|
||||
set -e
|
||||
|
||||
# NOTE that we do not provide persistent_peers
|
||||
bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--p2p.pex --rpc.unsafe"
|
||||
echo "started local_testnet_$ID"
|
||||
|
||||
# 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"
|
||||
|
||||
# Now we know that the node is up.
|
||||
|
||||
echo ""
|
||||
echo "PASS"
|
||||
echo ""
|
||||
|
Reference in New Issue
Block a user