mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-20 22:26:15 +00:00
Merge pull request #834 from tendermint/829-enable-logs-by-default
Enable logs by default
This commit is contained in:
@@ -13,39 +13,39 @@ N=$1
|
||||
|
||||
echo ""
|
||||
# run the test on each of them
|
||||
for i in `seq 1 $N`; do
|
||||
addr=$(test/p2p/ip.sh $i):46657
|
||||
for i in $(seq 1 "$N"); do
|
||||
addr=$(test/p2p/ip.sh "$i"):46657
|
||||
|
||||
# current state
|
||||
HASH1=`curl -s $addr/status | jq .result.latest_app_hash`
|
||||
|
||||
HASH1=$(curl -s "$addr/status" | jq .result.latest_app_hash)
|
||||
|
||||
# - send a tx
|
||||
TX=aadeadbeefbeefbeef0$i
|
||||
echo "Broadcast Tx $TX"
|
||||
curl -s $addr/broadcast_tx_commit?tx=0x$TX
|
||||
curl -s "$addr/broadcast_tx_commit?tx=0x$TX"
|
||||
echo ""
|
||||
|
||||
# we need to wait another block to get the new app_hash
|
||||
h1=`curl -s $addr/status | jq .result.latest_block_height`
|
||||
h1=$(curl -s "$addr/status" | jq .result.latest_block_height)
|
||||
h2=$h1
|
||||
while [ "$h2" == "$h1" ]; do
|
||||
sleep 1
|
||||
h2=`curl -s $addr/status | jq .result.latest_block_height`
|
||||
h2=$(curl -s "$addr/status" | jq .result.latest_block_height)
|
||||
done
|
||||
|
||||
# check that hash was updated
|
||||
HASH2=`curl -s $addr/status | jq .result.latest_app_hash`
|
||||
HASH2=$(curl -s "$addr/status" | jq .result.latest_app_hash)
|
||||
if [[ "$HASH1" == "$HASH2" ]]; then
|
||||
echo "Expected state hash to update from $HASH1. Got $HASH2"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check we get the same new hash on all other nodes
|
||||
for j in `seq 1 $N`; do
|
||||
for j in $(seq 1 "$N"); do
|
||||
if [[ "$i" != "$j" ]]; then
|
||||
addrJ=$(test/p2p/ip.sh $j):46657
|
||||
HASH3=`curl -s $addrJ/status | jq .result.latest_app_hash`
|
||||
|
||||
addrJ=$(test/p2p/ip.sh "$j"):46657
|
||||
HASH3=$(curl -s "$addrJ/status" | jq .result.latest_app_hash)
|
||||
|
||||
if [[ "$HASH2" != "$HASH3" ]]; then
|
||||
echo "App hash for node $j doesn't match. Got $HASH3, expected $HASH2"
|
||||
exit 1
|
||||
|
||||
+12
-24
@@ -14,27 +14,15 @@ set +eu
|
||||
|
||||
echo "starting tendermint peer ID=$ID"
|
||||
# start tendermint container on the network
|
||||
if [[ "$CIRCLECI" == true ]]; then
|
||||
set -u
|
||||
docker run -d \
|
||||
--net="$NETWORK_NAME" \
|
||||
--ip=$(test/p2p/ip.sh $ID) \
|
||||
--name "local_testnet_$ID" \
|
||||
--entrypoint tendermint \
|
||||
-e TMHOME="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
|
||||
--log-driver=syslog \
|
||||
--log-opt syslog-address=udp://127.0.0.1:5514 \
|
||||
--log-opt syslog-facility=daemon \
|
||||
--log-opt tag="{{.Name}}" \
|
||||
"$DOCKER_IMAGE" node $NODE_FLAGS --log_level=debug --proxy_app="$APP_PROXY"
|
||||
else
|
||||
set -u
|
||||
docker run -d \
|
||||
--net="$NETWORK_NAME" \
|
||||
--ip=$(test/p2p/ip.sh $ID) \
|
||||
--name "local_testnet_$ID" \
|
||||
--entrypoint tendermint \
|
||||
-e TMHOME="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
|
||||
"$DOCKER_IMAGE" node $NODE_FLAGS --log_level=info --proxy_app="$APP_PROXY"
|
||||
fi
|
||||
|
||||
set -u
|
||||
docker run -d \
|
||||
--net="$NETWORK_NAME" \
|
||||
--ip=$(test/p2p/ip.sh "$ID") \
|
||||
--name "local_testnet_$ID" \
|
||||
--entrypoint tendermint \
|
||||
-e TMHOME="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
|
||||
--log-driver=syslog \
|
||||
--log-opt syslog-address=udp://127.0.0.1:5514 \
|
||||
--log-opt syslog-facility=daemon \
|
||||
--log-opt tag="{{.Name}}" \
|
||||
"$DOCKER_IMAGE" node "$NODE_FLAGS" --log_level=debug --proxy_app="$APP_PROXY"
|
||||
|
||||
+5
-7
@@ -18,14 +18,12 @@ echo "* [$(date +"%T")] removing run_test container"
|
||||
docker rm -vf run_test
|
||||
set -e
|
||||
|
||||
set +u
|
||||
if [[ "$CIRCLECI" == true ]]; then
|
||||
echo
|
||||
echo "* [$(date +"%T")] starting rsyslog container"
|
||||
docker rm -f rsyslog || true
|
||||
docker run -d -v "$LOGS_DIR:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog
|
||||
fi
|
||||
echo
|
||||
echo "* [$(date +"%T")] starting rsyslog container"
|
||||
docker rm -f rsyslog || true
|
||||
docker run -d -v "$LOGS_DIR:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog
|
||||
|
||||
set +u
|
||||
if [[ "$SKIP_BUILD" == "" ]]; then
|
||||
echo
|
||||
echo "* [$(date +"%T")] building docker image"
|
||||
|
||||
Reference in New Issue
Block a user