Should look like this: https://imgur.com/a/m3iuWgi
Last active
May 2, 2021 16:08
-
-
Save pox/12f5c575e53ca81c1c0a5f75c4f49284 to your computer and use it in GitHub Desktop.
Update BlockClock Mini with Taproot Activation Progress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
set -o pipefail | |
# This script requires jq & curl (and bitcoin-cli of course). | |
# Set the correct hostname for your blockblock below: | |
export BLOCKCLOCK_HOSTNAME="192.168.1.175" | |
export SIGNALLING_PC="$(bitcoin-cli getblockchaininfo | jq -r '.softforks.taproot.bip9.statistics | 1000 * (.count / .elapsed) | round/10')" | |
export URL="http://$BLOCKCLOCK_HOSTNAME/api/show/number/$SIGNALLING_PC?sym=%25&br=Blocks%20Signalling%20Taproot" | |
curl "$URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this line to your crontab (`crontab -e`) with the correct path to the above script to update every 10 minutes. | |
*/10 * * * * PATH=$PATH:/usr/bin:/usr/local/bin /home/bitcoin/blockclock_taproot.sh 2>&1 | logger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment