diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-06-08 17:33:21 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-06-08 17:42:14 +0200 |
commit | cd0c5135ab2291aaa5410ac919bad3fc87249a4a (patch) | |
tree | ce83f74ab3173613b8e2fc209be82d23695df1bf /src/net.cpp | |
parent | 66ed450d771a8fc01c159a8402648ebd1c35eb4c (diff) | |
parent | 2d83013dc54320b3f0c978475517da6156f7b50d (diff) |
Merge #8083: Add support for dnsseeds with option to filter by servicebits
2d83013d Add support for dnsseeds with option to filter by servicebits (Jonas Schnelli)
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 be426236e4..8464b398b9 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1464,12 +1464,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++; |