Created
October 20, 2013 22:58
-
-
Save jonasbits/7076395 to your computer and use it in GitHub Desktop.
bitcoin-qt bash script to make bootstrap.dat of all the blocks, and check that the client is shutdown, if that matters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo $PWD | |
if ps aux | grep -q "[b]itcoin" ; then | |
echo "bitcoin is running, shut it down before running this script again" | |
ps aux | grep "[b]itcoin" | |
exit | |
fi | |
for i in blk*.dat | |
do | |
sec="$(date +%S)" | |
echo $i ">>" "bootstrap.dat" $sec | |
cat $i >> bootstrap.dat | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as pointed out on IRC, this script does not create a exact duplica of the torrent data of jgarzik. This is because of stale blocks (not included because they waste space), zero-padding (block files are preallocated). The script does work and you can use the file it create, but its not a deterministic copy, meaning its unique to your client.