Skip to content

Instantly share code, notes, and snippets.

@cwgoes
Created July 17, 2018 00:13
Show Gist options
  • Save cwgoes/af5c59061e0a3cc7be096ccc089415a6 to your computer and use it in GitHub Desktop.
Save cwgoes/af5c59061e0a3cc7be096ccc089415a6 to your computer and use it in GitHub Desktop.
Gaia 7000 status checking
#!/bin/sh
NODE=gaia-7000.coinculture.net:26657
while true; do
PREVOTING=$(curl -s http://$NODE/dump_consensus_state | jq '.result.round_state.votes[0].prevotes_bit_array' -r | tail -c 5)
REMAINING=$(echo "0.67 - $PREVOTING" | bc -l)
echo "$PREVOTING fraction of stake prevoting, $REMAINING fraction more necessary"
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment