Why does "pre-allocating..." still happen during -reindex?

1

I thought -reindex read blocks from disk to rebuild the index, without downloading the chain from the network. If that's so, why is bitcoind allocating memory in the files on disk? Like this:

Pre-allocating up to position 0x3000000 in blk00205.dat

pinhead

Posted 2017-04-22T18:11:12.650

Reputation: 2 356

It shouldn't. Can you provide some more of your debug.log?Pieter Wuille 2017-04-22T21:27:42.510

Ok I must have done something else wrong. At the top of the log is the message 2017-04-22 18:37:28 LoadBlockIndexDB: last block file = 209 even though the directory ~/.bitcoin/blocks/ contains files up to blk00834.dat. The first pre-allocating message in the log continues from blk00209.dat

I started with -reindex earlier today, stopped and then restarted a few times... – pinhead 2017-04-22T22:03:25.057

No answers