aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2012-03-25 17:47:54 -0700
committerPieter Wuille <[email protected]>2012-03-25 17:47:54 -0700
commit6eb339fae4920fb13d9ad8944fa1843dcc8f7217 (patch)
treeb7d863a9125f737711e07c0e3b5ff62cef4aa638 /src/net.cpp
parentMerge pull request #985 from TheBlueMatt/uri (diff)
parentGive DNS seeds a random age between 3 and 7 days old (diff)
downloaddiscoin-6eb339fae4920fb13d9ad8944fa1843dcc8f7217.tar.xz
discoin-6eb339fae4920fb13d9ad8944fa1843dcc8f7217.zip
Merge pull request #984 from sipa/youngseeds
Give DNS seeds a random age between 3 and 7 days old
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e9ec233a1..37e73c421 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1093,8 +1093,9 @@ void ThreadDNSAddressSeed2(void* parg)
{
BOOST_FOREACH(CNetAddr& ip, vaddr)
{
+ int nOneDay = 24*3600;
CAddress addr = CAddress(CService(ip, GetDefaultPort()));
- addr.nTime = 0;
+ addr.nTime = GetTime() - 3*nOneDay - GetRand(4*nOneDay); // use a random age between 3 and 7 days old
vAdd.push_back(addr);
found++;
}