diff options
| author | Wladimir J. van der Laan <[email protected]> | 2011-07-15 16:08:38 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2011-07-15 16:42:44 +0200 |
| commit | d4211176208b5e4ae4a699c6ce3239447752cdb2 (patch) | |
| tree | 2f1c91d534d1571e3a04c000d66590964bbc213e /src/init.cpp | |
| parent | move README.md out of the way for now (diff) | |
| parent | Merge pull request #414 from spiechu/polish-translation (diff) | |
| download | discoin-d4211176208b5e4ae4a699c6ce3239447752cdb2.tar.xz discoin-d4211176208b5e4ae4a699c6ce3239447752cdb2.zip | |
Merge branch 'master' of https://github.com/bitcoin/bitcoin
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index adbfa18c6..b69abb647 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -386,8 +386,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); @@ -415,7 +423,6 @@ bool AppInit2(int argc, char* argv[]) //// debug print printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size()); printf("nBestHeight = %d\n", nBestHeight); - printf("mapKeys.size() = %d\n", pwalletMain->mapKeys.size()); printf("setKeyPool.size() = %d\n", pwalletMain->setKeyPool.size()); printf("mapPubKeys.size() = %d\n", mapPubKeys.size()); printf("mapWallet.size() = %d\n", pwalletMain->mapWallet.size()); |