diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-01-28 00:31:00 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-01-28 00:31:00 +0000 |
commit | cb0f89646f065800d38d7cfc10ba1e855563296a (patch) | |
tree | 2cef9a44c911d1a80ef48bc74d50e7cc86b512b9 /net.cpp | |
parent | 9a36562347122482fd1e6e77c74df66ad8cf2c3f (diff) |
simplify AddAddress,
readcompactsize limit,
fixed a 64-bit compile error in serialize.h,
change status "# blocks" to "# confirmations" and widen the column.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@53 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'net.cpp')
-rw-r--r-- | net.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -223,7 +223,7 @@ bool GetMyExternalIP(unsigned int& ipRet) -bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline)
+bool AddAddress(CAddress addr, bool fCurrentlyOnline)
{
if (!addr.IsRoutable())
return false;
@@ -239,7 +239,7 @@ bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline) // New address
printf("AddAddress(%s)\n", addr.ToStringLog().c_str());
mapAddresses.insert(make_pair(addr.GetKey(), addr));
- addrdb.WriteAddress(addr);
+ CAddrDB().WriteAddress(addr);
return true;
}
else
@@ -260,7 +260,7 @@ bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline) fUpdated = true;
}
if (fUpdated)
- addrdb.WriteAddress(addrFound);
+ CAddrDB().WriteAddress(addrFound);
}
}
return false;
@@ -881,11 +881,11 @@ void ThreadOpenConnections2(void* parg) vnThreadsRunning[1]--;
Sleep(500);
const int nMaxConnections = 15;
- while (vNodes.size() >= nMaxConnections || vNodes.size() >= mapAddresses.size())
+ while (vNodes.size() >= nMaxConnections)
{
+ Sleep(2000);
if (fShutdown)
return;
- Sleep(2000);
}
vnThreadsRunning[1]++;
if (fShutdown)
|