BitcoinTalk

Checking the block chain on load

Checking the block chain on load

SVN rev 139 does a basic check of the block chain after loading.

With this we wouldn't have needed to delete blk*.dat, it would have automatically done a reorg back to the fork.  There wasn't time to do a careful implementation of this at the time.

It might take longer than we want, since it has to load all the blocks.  If it's too slow, we could have it only go back to a certain block number.

Re: Checking the block chain on load

In the next SVN rev, I'll make it only go back to the last checkpoint at block 74000.  If we need to correct a problem in the future, we can always make sure it goes back at least as far back as the problem.  Also, I'm adding code to verify the block index, which means the proof-of-work chain is checked.

Still, the system won't be entirely secure against your blk*.dat files.  You are trusting someone if you use a copy of their blk files.