1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-07-15 04:21:45 +00:00
Files
.circleci
.github
DOCKER
abci
benchmarks
blockchain
cmd
config
consensus
crypto
docs
evidence
libs
lite
mempool
networks
node
p2p
privval
proxy
rpc
scripts
install
json2wal
txs
wal2json
README.md
authors.sh
dist.sh
get_tools.sh
linkify_changelog.py
localnet-blocks-test.sh
publish.sh
release.sh
wire2amino.go
state
test
tools
types
version
.editorconfig
.gitignore
CHANGELOG.md
CHANGELOG_PENDING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
ROADMAP.md
SECURITY.md
UPGRADING.md
Vagrantfile
appveyor.yml
codecov.yml
docker-compose.yml
tendermint/scripts/localnet-blocks-test.sh

42 lines
815 B
Bash
Raw Normal View History

#!/bin/bash
ITERATIONS=$1
SLEEP=$2
NUMBLOCKS=$3
NODEADDR=$4
if [ -z "$1" ]; then
echo "Need to input number of iterations to run..."
exit 1
fi
if [ -z "$2" ]; then
echo "Need to input number of seconds to sleep between iterations"
exit 1
fi
if [ -z "$3" ]; then
echo "Need to input block height to declare completion..."
exit 1
fi
if [ -z "$4" ]; then
echo "Need to input node address to poll..."
exit 1
fi
I=0
while [ ${I} -lt "$ITERATIONS" ]; do
var=$(curl -s "$NODEADDR:26657/status" | jq -r ".result.sync_info.latest_block_height")
echo "Number of Blocks: ${var}"
if [ ! -z "${var}" ] && [ "${var}" -gt "${NUMBLOCKS}" ]; then
echo "Number of blocks reached, exiting success..."
exit 0
fi
I=$((I+1))
sleep "$SLEEP"
done
echo "Timeout reached, exiting failure..."
exit 1