<p>zero instead of magic bytes means the end of bictoin block data. just skip the rest of file and follow to next blk-file</p>

<p>by the way. it is better to assemble blk-files for future parsing with old clients (I use 0.8.5) because they put blocks in right order</p>

CC BY-SA 3.0
2016-09-06T15:33:56.203Z
I've checked that the block in the next file points to hash of previous one and indeed, it does. Thank you!
Martin Habovštiak
CC BY-SA 3.0
2016-09-05T07:45:47.760Z
2016-09-05T07:45:47.760Z
amaclin
<p>When writing a blockchain parser I've found that some blk00*.dat files contain zeros instead of blocks. (I got zero where magic bytes were expected, looked in the file and saw there are more zeros.)</p>

<p>What does it mean? Do I have corrupted chain? How do I fix my parser, so it would interpret the file correctly?</p>

<blockchain><bitcoin-core>
Zeros in blk00*.dat files
Martin Habovštiak
# Zeros in blk00*.dat files

(Asked by: username_0 on 2016-09-04)

When writing a blockchain parser I've found that some blk00\*.dat files contain zeros instead of blocks. (I got zero where magic bytes were expected, looked in the file and saw there are more zeros.)

What does it mean? Do I have corrupted chain? How do I fix my parser, so it would interpret the file correctly?

**Tags:** blockchain, bitcoin-core


---

## 1 answers

### Answer by username_1 on 2016-09-05. Score: 2 | Accepted answer

zero instead of magic bytes means the end of bictoin block data. just skip the rest of file and follow to next blk-file

by the way. it is better to assemble blk-files for future parsing with old clients (I use 0.8.5) because they put blocks in right order

> **Comments:**
> **username_0**: I've checked that the block in the next file points to hash of previous one and indeed, it does. Thank you!  

---

