diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-05-21 23:55:22 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-05-25 14:57:24 +0200 |
commit | 2d83013dc54320b3f0c978475517da6156f7b50d (patch) | |
tree | 5d5648c31b3093367cfe694eeea072f1895d3662 /src/net.cpp | |
parent | 37f9a1f627c0995d89b62923e75cd092600894f9 (diff) |
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 bbd23d292a..54d14a7234 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++; |