Fix bad return values in LoadWallet.

This commit is contained in:
Matt Corallo 2011-07-14 18:15:50 +02:00
parent 24271c542b
commit 3a10d1c493
1 changed files with 3 additions and 3 deletions

View File

@ -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")
{