diff options
-rw-r--r-- | doc/README.md | 2 | ||||
-rw-r--r-- | doc/README_windows.txt | 2 | ||||
-rw-r--r-- | src/init.cpp | 3 | ||||
-rw-r--r-- | src/net.cpp | 12 |
4 files changed, 16 insertions, 3 deletions
diff --git a/doc/README.md b/doc/README.md index f5aeb34a3c..924f5a8a69 100644 --- a/doc/README.md +++ b/doc/README.md @@ -72,5 +72,5 @@ The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/ License --------------------- Distributed under the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php). -This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](http://www.openssl.org/). This product includes +This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard. diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 18fd4216f9..368f2b45e1 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -5,7 +5,7 @@ Copyright (c) 2009-2014 Bitcoin Core Developers Distributed under the MIT/X11 software license, see the accompanying
file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
-the OpenSSL Toolkit (http://www.openssl.org/). This product includes
+the OpenSSL Toolkit (https://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com).
diff --git a/src/init.cpp b/src/init.cpp index 127529382f..14816f5016 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -240,7 +240,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -connect=<ip> " + _("Connect only to the specified node(s)") + "\n"; strUsage += " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n"; strUsage += " -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)") + "\n"; - strUsage += " -dnsseed " + _("Find peers using DNS lookup (default: 1 unless -connect)") + "\n"; + strUsage += " -dnsseed " + _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)") + "\n"; + strUsage += " -forcednsseed " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n"; strUsage += " -externalip=<ip> " + _("Specify your own public address") + "\n"; strUsage += " -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n"; strUsage += " -maxconnections=<n> " + _("Maintain at most <n> connections to peers (default: 125)") + "\n"; diff --git a/src/net.cpp b/src/net.cpp index e004fbeb73..62124514c8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1221,6 +1221,18 @@ void MapPort(bool) void ThreadDNSAddressSeed() { + // goal: only query DNS seeds if address need is acute + if ((addrman.size() > 0) && + (!GetBoolArg("-forcednsseed", false))) { + MilliSleep(11 * 1000); + + LOCK(cs_vNodes); + if (vNodes.size() >= 2) { + LogPrintf("P2P peers available. Skipped DNS seeding.\n"); + return; + } + } + const vector<CDNSSeedData> &vSeeds = Params().DNSSeeds(); int found = 0; |