bitcoin/bitcoin — pull request #975 by sipa (2012-03-22 04:06:24+00:00)
Title: Check minversion before loading the rest of the wallet

When a 0.6 wallet with compressed pubkeys is created, it writes a minversion record to prevent older clients from reading it. If the 0.5 loading it sees a key record before seeing the minversion record however, it will fail with DB_CORRUPT instead of DB_TOO_NEW.