diff options
| author | Matt Corallo <[email protected]> | 2011-07-01 02:09:51 +0200 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2011-07-01 17:33:19 +0200 |
| commit | ce8f78a7bba77ecef50a983de9b221224e9389b6 (patch) | |
| tree | b03f148745aaf65c5b0e9af2b1dea639a535550f /src/net.cpp | |
| parent | Merge pull request #367 from TheBlueMatt/dnsseed (diff) | |
| download | discoin-ce8f78a7bba77ecef50a983de9b221224e9389b6.tar.xz discoin-ce8f78a7bba77ecef50a983de9b221224e9389b6.zip | |
Only use dnsseeds and static seeds 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 e4b02331e..182153003 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++; + } } } } |