Skip to content

Instantly share code, notes, and snippets.

View lucasmoten's full-sized avatar
💯

Lucas Moten lucasmoten

💯
View GitHub Profile
@lucasmoten
lucasmoten / taproot.sh
Last active May 2, 2021 21:56 — forked from mutatrum/taproot.sh
Print a taproot signalling block diagram
#!/bin/bash
BLOCKCHAININFO=`bitcoin-cli getblockchaininfo`
TAPROOT=`echo $BLOCKCHAININFO | jq .softforks.taproot.bip8`
SINCE=`echo $TAPROOT | jq .since`
ELAPSED=`echo $TAPROOT | jq .statistics.elapsed`
color_green='\033[0;32m'
color_red='\033[0;31m'
for BLOCK in $(seq $SINCE $((SINCE + ELAPSED - 1))); do
HASH=`bitcoin-cli getblockhash $BLOCK`
HEADER=`bitcoin-cli getblockheader $HASH`