bitcoin-qt bash script to make bootstrap.dat of all the blocks, and check that the client is shutdown, if that matters
#! /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
This comment has been minimized.
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.