aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2011-07-05 03:06:19 +0200
committerMatt Corallo <matt@bluematt.me>2011-07-05 18:36:01 +0200
commit7ec552676c66488fe00fb503d02ec4a389a715b7 (patch)
tree6791d8dd85e2aaa82ee7b2396b123716ccd093f2 /src/init.cpp
parent9390431ce49893cbdf23846edb4bdf72b3d4e830 (diff)
downloadbitcoin-7ec552676c66488fe00fb503d02ec4a389a715b7.tar.xz
Add minversion to wallet.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 635799ccf9..beaad68899 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);