diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2011-07-01 16:33:28 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2011-07-01 16:33:28 -0700 |
commit | b73ab2d885011a3a9434de59c27eaf9cce7a4dc5 (patch) | |
tree | 4f56792ffe3db3430f233771171b415ea403c126 /src/net.cpp | |
parent | 056d2ad3121bae19c321b33ce3352a61a1766411 (diff) | |
parent | ce8f78a7bba77ecef50a983de9b221224e9389b6 (diff) |
Merge pull request #368 from TheBlueMatt/dnsseed
Only use dnsseeds when not on testnet.
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/net.cpp b/src/net.cpp index a0ec6dfadc..e8422a5376 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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++; + } } } } |