bitcoin/bitcoin — pull request #2249 by sipa (2013-01-30 20:45:47+00:00)
Title: Make sure the genesis block is present after reindex

Split off InitBlockIndex from LoadBlockIndex, and call it again after finishing reindexing. This makes sure -reindex on an empty datadir still ends up with a sane database.

Also, protecting the initialization with a try-catch block.