Update CWallet::LoadWallet for proper return type.

This commit is contained in:
Jeff Garzik 2011-07-13 01:07:49 -04:00 committed by Jeff Garzik
parent 4ea952d5c0
commit 116df55e21
3 changed files with 6 additions and 5 deletions

View File

@ -346,7 +346,8 @@ enum DBErrors
{ {
DB_LOAD_OK, DB_LOAD_OK,
DB_CORRUPT, DB_CORRUPT,
DB_TOO_NEW DB_TOO_NEW,
DB_LOAD_FAIL,
}; };
class CWalletDB : public CDB class CWalletDB : public CDB

View File

@ -1122,7 +1122,7 @@ string CWallet::SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWall
bool CWallet::LoadWallet(bool& fFirstRunRet) int CWallet::LoadWallet(bool& fFirstRunRet)
{ {
if (!fFileBacked) if (!fFileBacked)
return false; return false;
@ -1139,11 +1139,11 @@ bool CWallet::LoadWallet(bool& fFirstRunRet)
SetDefaultKey(GetOrReuseKeyFromPool()); SetDefaultKey(GetOrReuseKeyFromPool());
if (!SetAddressBookName(PubKeyToAddress(vchDefaultKey), "")) if (!SetAddressBookName(PubKeyToAddress(vchDefaultKey), ""))
return false; return DB_LOAD_FAIL;
} }
CreateThread(ThreadFlushWalletDB, &strWalletFile); CreateThread(ThreadFlushWalletDB, &strWalletFile);
return true; return DB_LOAD_OK;
} }

View File

@ -167,7 +167,7 @@ public:
walletdb.WriteBestBlock(loc); walletdb.WriteBestBlock(loc);
} }
bool LoadWallet(bool& fFirstRunRet); int LoadWallet(bool& fFirstRunRet);
// bool BackupWallet(const std::string& strDest); // bool BackupWallet(const std::string& strDest);
// requires cs_mapAddressBook lock // requires cs_mapAddressBook lock