Repeatedly resetting the timestamp for seed nodes in the database was slow. Only update the database if it's a real change.

This commit is contained in:
Chris Moore 2011-01-24 14:47:36 -08:00
parent 84e7ad922b
commit 10abe4f26e

View file

@ -1022,7 +1022,7 @@ void ThreadOpenConnections2(void* parg)
{
foreach(PAIRTYPE(const vector<unsigned char>, CAddress)& item, mapAddresses)
{
if (setSeed.count(item.second.ip))
if (setSeed.count(item.second.ip) && item.second.nTime != 0)
{
item.second.nTime = 0;
CAddrDB().WriteAddress(item.second);