Merge pull request #904 from tendermint/fix-atomic-broadcast-test

test/p2p/atomic_broadcast: wait for node heights before checking app hash
This commit is contained in:
Ethan Buchman
2017-11-28 08:21:15 +00:00
committed by GitHub

View File

@ -33,6 +33,20 @@ for i in $(seq 1 "$N"); do
h2=$(curl -s "$addr/status" | jq .result.latest_block_height)
done
# wait for all other peers to get to this height
minHeight=$h2
for j in $(seq 1 "$N"); do
if [[ "$i" != "$j" ]]; then
addrJ=$(test/p2p/ip.sh "$j"):46657
h=$(curl -s "$addrJ/status" | jq .result.latest_block_height)
while [ "$h" -lt "$minHeight" ]; do
sleep 1
h=$(curl -s "$addrJ/status" | jq .result.latest_block_height)
done
fi
done
# check that hash was updated
HASH2=$(curl -s "$addr/status" | jq .result.latest_app_hash)
if [[ "$HASH1" == "$HASH2" ]]; then