From 3a10d1c49390f26daed14d6362f72c154ac191e7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 14 Jul 2011 18:15:50 +0200 Subject: [PATCH] Fix bad return values in LoadWallet. --- src/db.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index 4df05d68..6692db23 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 vchPrivKey; ssValue >> vchPrivKey; if (!pwallet->LoadCryptedKey(vchPubKey, vchPrivKey)) - return false; + return DB_CORRUPT; } else if (strType == "defaultkey") {