0

I accidentally deleted all the files that the standard bitcoin client stores to disk, except blk*.dat files. When I run bitcoind, he write that he doing sync. This sync is very very slow. What does bitcoind doing with this blk*.dat files while sync? And why there is need to connect to the internet during sync (it did not work without internet)?

1 Answer 1

0

The block files are indexed (the blocks/index subdirectory), and if you just delete the index, bitcoind will assume you have no blocks and start over downloading from the network.

You could instead have used the -reindex option to scan for blocks on disk and rebuild the index. This may still work, but likely won't as you've already started downloading again, and overwriting the existing block files.

3
  • but why bitcoind download again all raw data from the network? Jul 3, 2017 at 20:08
  • Because it does not know you already have it. Jul 3, 2017 at 20:22
  • the blockchain is linking each new block to a previous block (with the transactions). Hence the chain. When the client doesn't know the structure, it will reload the blockchain. And it verifies not only the blocks, it verifies also the transactions inside the blocks, to be sure your local copy of the block chain has valid data. This requires a connection to the network. More on this in Andreas Antonopolus book "Mastering Bitcoin", or on the bitcoin.org webpages, in the developper section. Jul 4, 2017 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.