aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2011-07-14 09:37:50 -0700
committerJeff Garzik <jgarzik@exmulti.com>2011-07-14 09:37:50 -0700
commit065d74301990d6cfce35ca3a6be264d0b975619b (patch)
tree9f8c7b827f52effe57653645a78d3267bde6242e /src
parent24271c542b9a0d6016badf5438fb7e5ff7961ace (diff)
parent3a10d1c49390f26daed14d6362f72c154ac191e7 (diff)
Merge pull request #413 from TheBlueMatt/loadwalletret
Fix bad return values in LoadWallet.
Diffstat (limited to 'src')
-rw-r--r--src/db.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 4df05d68ed..6692db239f 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -777,7 +777,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
key.SetPrivKey(wkey.vchPrivKey);
}
if (!pwallet->LoadKey(key))
- return false;
+ return DB_CORRUPT;
}
else if (strType == "mkey")
{
@@ -786,7 +786,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
CMasterKey kMasterKey;
ssValue >> kMasterKey;
if(pwallet->mapMasterKeys.count(nID) != 0)
- return false;
+ return DB_CORRUPT;
pwallet->mapMasterKeys[nID] = kMasterKey;
if (pwallet->nMasterKeyMaxID < nID)
pwallet->nMasterKeyMaxID = nID;
@@ -798,7 +798,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
vector<unsigned char> vchPrivKey;
ssValue >> vchPrivKey;
if (!pwallet->LoadCryptedKey(vchPubKey, vchPrivKey))
- return false;
+ return DB_CORRUPT;
}
else if (strType == "defaultkey")
{