citadel

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

btc-blocks-behind (166B)


      1 #!/usr/bin/env bash
      2 
      3 monad_blocks=$(ssh monad btc-blocks 2>/dev/null)
      4 our_blocks=$(btc blocks)
      5 behind=$(bc <<<"$monad_blocks - $our_blocks")
      6 
      7 printf "%s\n" "$behind"