mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-16 22:51:22 +00:00
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:
@ -33,6 +33,20 @@ for i in $(seq 1 "$N"); do
|
|||||||
h2=$(curl -s "$addr/status" | jq .result.latest_block_height)
|
h2=$(curl -s "$addr/status" | jq .result.latest_block_height)
|
||||||
done
|
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
|
# 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
|
if [[ "$HASH1" == "$HASH2" ]]; then
|
||||||
|
Reference in New Issue
Block a user