Skip to content

Instantly share code, notes, and snippets.

@lukestokes
Last active March 10, 2019 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lukestokes/c69d13b6fc2440d3f41d2d1ea9b911b5 to your computer and use it in GitHub Desktop.
Save lukestokes/c69d13b6fc2440d3f41d2d1ea9b911b5 to your computer and use it in GitHub Desktop.
Print out the current block numbers for all nodes.
#!/bin/bash
PREFIX="0"
START_NUMBER=$(<~/smartcash/start_number.txt)
END_NUMBER=$(<~/smartcash/end_number.txt)
for (( number=$START_NUMBER; number<=$END_NUMBER; number++ ))
do
if [ $number -gt 9 ]
then
PREFIX=""
fi
display=$(~/smartcash/smart-cli.sh $PREFIX$number getblockcount)
echo "SmartNode$PREFIX$number: $display"
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment