diff options
| author | Jonas Schnelli <[email protected]> | 2016-05-21 23:55:22 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-05-25 14:57:24 +0200 |
| commit | 2d83013dc54320b3f0c978475517da6156f7b50d (patch) | |
| tree | 5d5648c31b3093367cfe694eeea072f1895d3662 /src/net.cpp | |
| parent | Merge #8047: [qa] test_framework: Set wait-timeout for bitcoind procs (diff) | |
| download | discoin-2d83013dc54320b3f0c978475517da6156f7b50d.tar.xz discoin-2d83013dc54320b3f0c978475517da6156f7b50d.zip | |
Add support for dnsseeds with option to filter by servicebits
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index bbd23d292..54d14a723 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1466,12 +1466,13 @@ void ThreadDNSAddressSeed() } else { std::vector<CNetAddr> vIPs; std::vector<CAddress> vAdd; - if (LookupHost(seed.host.c_str(), vIPs, 0, true)) + uint64_t requiredServiceBits = NODE_NETWORK; + if (LookupHost(seed.getHost(requiredServiceBits).c_str(), vIPs, 0, true)) { BOOST_FOREACH(const CNetAddr& ip, vIPs) { int nOneDay = 24*3600; - CAddress addr = CAddress(CService(ip, Params().GetDefaultPort())); + CAddress addr = CAddress(CService(ip, Params().GetDefaultPort()), requiredServiceBits); addr.nTime = GetTime() - 3*nOneDay - GetRand(4*nOneDay); // use a random age between 3 and 7 days old vAdd.push_back(addr); found++; |