citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

btc-sendblocks (294B)


      1 #/usr/bin/env bash
      2 
      3 HEIGHT=${1:-708720}
      4 DST=${2:-quiver}
      5 
      6 set -eou pipefail
      7 
      8 if [ -z $1 ]
      9 then
     10 	printf "usage: btc-sendblocks <from-height> <DSTNODE>\n"
     11 	exit 0
     12 fi
     13 
     14 for i in $(seq $HEIGHT $(btc blocks))
     15 do
     16 	bcli getblock $(bcli getblockhash $i) 0 |
     17 	xxd -r -p |
     18 	nncp-exec "$DST" block $i
     19 done