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

<p>You could instead have used the <code>-reindex</code> 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.</p>

CC BY-SA 3.0
2017-07-03T20:08:41.753Z
but why `bitcoind` download again all raw data from the network?
Denis Leonov
CC BY-SA 3.0
2017-07-03T20:22:25.180Z
Because it does not know you already have it.
Pieter Wuille
CC BY-SA 3.0
2017-07-04T06:24:53.867Z
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.
pebwindkraft
CC BY-SA 3.0
2017-07-03T18:13:13.863Z
2017-07-03T18:13:13.863Z
Pieter Wuille
<p>I accidentally deleted all the files that the standard bitcoin client stores to disk, except <code>blk*.dat</code> files. When I run <code>bitcoind</code>, he write that he doing sync. This sync is very very slow. What does <code>bitcoind</code> doing with this <code>blk*.dat</code> files while sync? And why there is need to connect to the internet during sync (it did not work without internet)?</p>

<bitcoind><bitcoin-core><synchronization>
Bitcoind sync process
Denis Leonov
# Bitcoind sync process

(Asked by: username_0 on 2017-07-03)

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)?

**Tags:** bitcoind, bitcoin-core, synchronization


---

## 1 answers

### Answer by username_1 on 2017-07-03. Score: 0 | Accepted 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.

> **Comments:**
> **username_0**: but why `bitcoind` download again all raw data from the network?  
> **username_1**: Because it does not know you already have it.  
> **username_2**: 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.  

---

