diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-11-05 04:41:36 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-11-05 04:41:36 +0000 |
commit | e4c05d31778a85014b2a52e2f20753b38dfbf950 (patch) | |
tree | 8b82ec196f05e1297dd87e0d857507f8ea1cf975 /db.cpp | |
parent | b7362c07ae42ac4282361ee95b82424d502f1b82 (diff) |
unix build merged in, bitmap resources from xpm instead of rc, better addr relay, better selection of addrs by time last seen for faster connect
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@32 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'db.cpp')
-rw-r--r-- | db.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -62,9 +62,9 @@ CDB::CDB(const char* pszFile, const char* pszMode, bool fTxn) : pdb(NULL) if (fShutdown)
return;
string strDataDir = GetDataDir();
- string strLogDir = strDataDir + "\\database";
+ string strLogDir = strDataDir + "/database";
_mkdir(strLogDir.c_str());
- string strErrorFile = strDataDir + "\\db.log";
+ string strErrorFile = strDataDir + "/db.log";
printf("dbenv.open strLogDir=%s strErrorFile=%s\n", strLogDir.c_str(), strErrorFile.c_str());
dbenv.set_lg_dir(strLogDir.c_str());
@@ -411,7 +411,6 @@ bool CAddrDB::WriteAddress(const CAddress& addr) bool CAddrDB::LoadAddresses()
{
- CRITICAL_BLOCK(cs_mapIRCAddresses)
CRITICAL_BLOCK(cs_mapAddresses)
{
// Load user provided addresses
@@ -425,10 +424,7 @@ bool CAddrDB::LoadAddresses() {
CAddress addr(psz, NODE_NETWORK);
if (addr.IsValid())
- {
AddAddress(*this, addr);
- mapIRCAddresses.insert(make_pair(addr.GetKey(), addr));
- }
}
}
catch (...) { }
@@ -678,7 +674,7 @@ void ThreadFlushWalletDB(void* parg) if (nRefCount == 0 && !fShutdown)
{
// Flush wallet.dat so it's self contained
- nLastFlushed == nWalletDBUpdated;
+ nLastFlushed = nWalletDBUpdated;
int64 nStart = GetTimeMillis();
dbenv.txn_checkpoint(0, 0, 0);
dbenv.lsn_reset(strFile.c_str(), 0);
|