mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Give DNS seeds a random age between 3 and 7 days old
This speeds up initial connections with an old/large addr.dat a lot.
This commit is contained in:
parent
4a17e3e6b9
commit
bf1afb02ca
@ -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 New Issue
Block a user