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
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.
-
-
-
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