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 | 80264be428b7ec7692e6633a0f21232c63a0b62c (patch) | |
tree | 2cef9a44c911d1a80ef48bc74d50e7cc86b512b9 /net.cpp | |
parent | 95d839f15c2ae418939bbecdc95228f00ea4466d (diff) |
simplify AddAddress,
readcompactsize limit,
fixed a 64-bit compile error in serialize.h,
change status "# blocks" to "# confirmations" and widen the column.
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)
|