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

I assume it will take more than 1 second to do.
Do we have to do this every time it starts up Sad

Can we make a menu option for it, to fire it off manually?
And make a counter so that it reminds you to check every n loads/days.
or whenever you update the software.

It just seems that needing to recheck the entire block chain will be a very rare event, so rechecking the block chain all the time is overkill.

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.