Revision ca03e43d931bf64e455b182164b302234dbd030a authored by dependabot-preview[bot] on 30 January 2020, 11:34:07 UTC, committed by GitHub on 30 January 2020, 11:34:07 UTC
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.3.2...v1.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
1 parent b04b752
Raw File
localnet-blocks-test.sh
#!/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
back to top