diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-12-11 16:49:21 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-12-11 16:49:21 +0000 |
commit | 4ea3f3da1a0c00ea74e85c31a22ea94d18bbdf06 (patch) | |
tree | 4f9bb0b8598035b704a8abe08a292e8465e7c1c6 /db.cpp | |
parent | b075bbf9862df41cdf5265026ba787b7d0fecb07 (diff) |
retry IRC if name in use,
resize to fit ubuntu's giant default font,
scroll debug.log,
pause gen during initial block download
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@44 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'db.cpp')
-rw-r--r-- | db.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -445,7 +445,7 @@ bool CAddrDB::LoadAddresses() CRITICAL_BLOCK(cs_mapAddresses)
{
// Load user provided addresses
- CAutoFile filein = fopen("addr.txt", "rt");
+ CAutoFile filein = fopen((GetDataDir() + "/addr.txt").c_str(), "rt");
if (filein)
{
try
@@ -536,10 +536,11 @@ bool CReviewDB::WriteReviews(uint256 hash, const vector<CReview>& vReviews) bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
{
vchDefaultKeyRet.clear();
+ int nFileVersion = 0;
// Modify defaults
#ifndef __WXMSW__
- // Reports that tray icon can disappear on gnome, leaving no way to access the program
+ // Tray icon sometimes disappears on 9.10 karmic koala 64-bit, leaving no way to access the program
fMinimizeToTray = false;
fMinimizeOnClose = false;
#endif
@@ -607,6 +608,10 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet) {
ssValue >> vchDefaultKeyRet;
}
+ else if (strType == "version")
+ {
+ ssValue >> nFileVersion;
+ }
else if (strType == "setting")
{
string strKey;
@@ -649,6 +654,16 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet) WriteSetting("nTransactionFee", nTransactionFee);
}
+ // Upgrade
+ if (nFileVersion < VERSION)
+ {
+ // Get rid of old debug.log file in current directory
+ if (nFileVersion <= 105 && !pszSetDataDir[0])
+ unlink("debug.log");
+
+ WriteVersion(VERSION);
+ }
+
return true;
}
@@ -656,7 +671,7 @@ bool LoadWallet(bool& fFirstRunRet) {
fFirstRunRet = false;
vector<unsigned char> vchDefaultKey;
- if (!CWalletDB("cr").LoadWallet(vchDefaultKey))
+ if (!CWalletDB("cr+").LoadWallet(vchDefaultKey))
return false;
fFirstRunRet = vchDefaultKey.empty();
|