SHARE
TWEET

Untitled

a guest Nov 14th, 2014 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/bash
  2.  
  3. # assumes that bitcoind is running
  4. blockmax=$1
  5. should_continue=0
  6.  
  7. while [ $should_continue -eq 0 ]; do
  8.     current_block=`bitcoind getblockcount`
  9.     if [ $current_block -lt $blockmax ]; then
  10.         echo "bitcoind at $current_block, not yet at $blockmax"
  11.     elif [ $current_block -gt $blockmax ]; then
  12.         echo "bitcoind passed $1"
  13.         should_continue=1
  14.         exit
  15.     elif [ $current_block -eq $blockmax ]; then
  16.         bitcoind stop
  17.         should_continue=1
  18.         exit
  19.     fi
  20.     sleep 1
  21. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top