aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-07-13 01:07:49 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-07-13 01:07:49 -0400
commit116df55e21e5380c1cf4bccc62546757d44c1294 (patch)
tree3001721aa336b507f8d8c88e1db3166ab1806cc8
parent4ea952d5c03e18b9ddd0e97f4434cd9092358dab (diff)
Update CWallet::LoadWallet for proper return type.
-rw-r--r--src/db.h3
-rw-r--r--src/wallet.cpp6
-rw-r--r--src/wallet.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/db.h b/src/db.h
index bd8254f7dd..049857b3ab 100644
--- a/src/db.h
+++ b/src/db.h
@@ -346,7 +346,8 @@ enum DBErrors
{
DB_LOAD_OK,
DB_CORRUPT,
- DB_TOO_NEW
+ DB_TOO_NEW,
+ DB_LOAD_FAIL,
};
class CWalletDB : public CDB
diff --git a/src/wallet.cpp b/src/wallet.cpp
index f4df5ecf64..a60b0b4fa5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1122,7 +1122,7 @@ string CWallet::SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWall
-bool CWallet::LoadWallet(bool& fFirstRunRet)
+int CWallet::LoadWallet(bool& fFirstRunRet)
{
if (!fFileBacked)
return false;
@@ -1139,11 +1139,11 @@ bool CWallet::LoadWallet(bool& fFirstRunRet)
SetDefaultKey(GetOrReuseKeyFromPool());
if (!SetAddressBookName(PubKeyToAddress(vchDefaultKey), ""))
- return false;
+ return DB_LOAD_FAIL;
}
CreateThread(ThreadFlushWalletDB, &strWalletFile);
- return true;
+ return DB_LOAD_OK;
}
diff --git a/src/wallet.h b/src/wallet.h
index d336d38765..c19b3f43c7 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -167,7 +167,7 @@ public:
walletdb.WriteBestBlock(loc);
}
- bool LoadWallet(bool& fFirstRunRet);
+ int LoadWallet(bool& fFirstRunRet);
// bool BackupWallet(const std::string& strDest);
// requires cs_mapAddressBook lock