Skip to content

Instantly share code, notes, and snippets.

Created Aug 24, 2021
What would you like to do?
Helium Miner status
export ANIMAL=angry-purple-tiger #replace with your miner
hotspot=$(curl -s${ANIMAL})
# TODO: error if result != 1
miner_height=$(echo $hotspot | jq -r '.data[].status.height')
chain_height=$(echo $hotspot | jq -r '.data[].block')
percentage=$(bc <<<"scale=6; $miner_height / $chain_height")
echo "=== ${ANIMAL} ==="
echo miner_height = ${miner_height}
echo chain_height = ${chain_height}
echo lag = $((${chain_height}-${miner_height}))
echo percentage = ${percentage}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment