bitcoin/bitcoin — pull request #2062 by sipa (2012-12-02 20:55:00+00:00)
Title: Reconstruct coins/ database when missing

When the blocks/ and blktree/ databases exist, but the coins/ database doesn't, reconstruct it automatically at startup.

More generally, if the block database has more recent blocks than the coins database, they are automatically constructed at startup. This already worked, but not when the coins database was missing entirely. This pullreq should fix that.

This provides a very nice way for benchmarking the block validation logic, as this reconstruction happens before the actual node is started, and doesn't require writing to block files.