Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- # assumes that bitcoind is running
- blockmax=$1
- should_continue=0
- while [ $should_continue -eq 0 ]; do
- current_block=`bitcoind getblockcount`
- if [ $current_block -lt $blockmax ]; then
- echo "bitcoind at $current_block, not yet at $blockmax"
- elif [ $current_block -gt $blockmax ]; then
- echo "bitcoind passed $1"
- should_continue=1
- exit
- elif [ $current_block -eq $blockmax ]; then
- bitcoind stop
- should_continue=1
- exit
- fi
- sleep 1
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement