mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Merge pull request #984 from sipa/youngseeds
Give DNS seeds a random age between 3 and 7 days old
This commit is contained in:
commit
6eb339fae4
1 changed files with 2 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue