Skip to content

Commit

Permalink
Only use dnsseeds and static seeds when not on testnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Corallo committed Jul 1, 2011
1 parent 44d1632 commit ce8f78a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,19 +1146,22 @@ void DNSAddressSeed()
{
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++) {
vector<CAddress> vaddr;
if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
{
BOOST_FOREACH (CAddress& addr, vaddr)
for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
vector<CAddress> vaddr;
if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
{
if (addr.GetByte(3) != 127)
BOOST_FOREACH (CAddress& addr, vaddr)
{
addr.nTime = 0;
AddAddress(addr);
found++;
if (addr.GetByte(3) != 127)
{
addr.nTime = 0;
AddAddress(addr);
found++;
}
}
}
}
Expand Down

0 comments on commit ce8f78a

Please sign in to comment.