Only use dnsseeds and static seeds when not on testnet.
This commit is contained in:
parent
44d16327c1
commit
ce8f78a7bb
1 changed files with 13 additions and 10 deletions
23
src/net.cpp
23
src/net.cpp
|
@ -1146,19 +1146,22 @@ void DNSAddressSeed()
|
||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
printf("Loading addresses from DNS seeds (could take a while)\n");
|
if (!fTestNet)
|
||||||
|
{
|
||||||
|
printf("Loading addresses from DNS seeds (could take a while)\n");
|
||||||
|
|
||||||
for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
|
for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
|
||||||
vector<CAddress> vaddr;
|
vector<CAddress> vaddr;
|
||||||
if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
|
if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
|
||||||
{
|
|
||||||
BOOST_FOREACH (CAddress& addr, vaddr)
|
|
||||||
{
|
{
|
||||||
if (addr.GetByte(3) != 127)
|
BOOST_FOREACH (CAddress& addr, vaddr)
|
||||||
{
|
{
|
||||||
addr.nTime = 0;
|
if (addr.GetByte(3) != 127)
|
||||||
AddAddress(addr);
|
{
|
||||||
found++;
|
addr.nTime = 0;
|
||||||
|
AddAddress(addr);
|
||||||
|
found++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue