diff options
| author | Jeff Garzik <[email protected]> | 2011-07-12 19:34:30 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2011-07-12 19:34:30 -0700 |
| commit | 0fa89d8e816807a621419495d7bdc6366979a0f0 (patch) | |
| tree | 32327a402bb77104f74738c2a10022c8938db252 /src/init.cpp | |
| parent | Merge pull request #402 from jayschwa/hirez-icon (diff) | |
| parent | Add minversion to wallet. (diff) | |
| download | discoin-0fa89d8e816807a621419495d7bdc6366979a0f0.tar.xz discoin-0fa89d8e816807a621419495d7bdc6366979a0f0.zip | |
Merge pull request #381 from TheBlueMatt/nminversion
Add minversion to wallet.
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 21b40d519..fd1d8d3cd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -387,8 +387,16 @@ bool AppInit2(int argc, char* argv[]) nStart = GetTimeMillis(); bool fFirstRun; pwalletMain = new CWallet("wallet.dat"); - if (!pwalletMain->LoadWallet(fFirstRun)) - strErrors += _("Error loading wallet.dat \n"); + int nLoadWalletRet = pwalletMain->LoadWallet(fFirstRun); + if (nLoadWalletRet != DB_LOAD_OK) + { + if (nLoadWalletRet == DB_CORRUPT) + strErrors += _("Error loading wallet.dat: Wallet corrupted \n"); + else if (nLoadWalletRet == DB_TOO_NEW) + strErrors += _("Error loading wallet.dat: Wallet requires newer version of Bitcoin \n"); + else + strErrors += _("Error loading wallet.dat \n"); + } printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); RegisterWallet(pwalletMain); |