From e4c05d31778a85014b2a52e2f20753b38dfbf950 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Thu, 5 Nov 2009 04:41:36 +0000 Subject: 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 --- db.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'db.cpp') diff --git a/db.cpp b/db.cpp index f9e25834d0..b702b0cbac 100644 --- a/db.cpp +++ b/db.cpp @@ -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); -- cgit v1.2.3