aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorwodry <wodry@users.noreply.github.com>2018-06-24 22:09:01 +0200
committerwodry <wodry@users.noreply.github.com>2018-06-24 22:09:01 +0200
commit9f8c54b1b5ddedddf47fc51c1fcb533321f6f89f (patch)
tree475a5b69489387840cd97998501c63ec0f599ec5 /src/netbase.cpp
parent3a4549301ab2468cd9ae0865aa66819878ae409a (diff)
downloadbitcoin-9f8c54b1b5ddedddf47fc51c1fcb533321f6f89f.tar.xz
Log warning message when deprecated network name 'tor' is used (e.g. option onlynet=tor)
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 15f9016be8..db68e9240a 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -41,7 +41,11 @@ enum Network ParseNetwork(std::string net) {
boost::to_lower(net);
if (net == "ipv4") return NET_IPV4;
if (net == "ipv6") return NET_IPV6;
- if (net == "tor" || net == "onion") return NET_TOR;
+ if (net == "onion") return NET_TOR;
+ if (net == "tor") {
+ LogPrintf("Warning: net name 'tor' is deprecated and will be removed in the future. You should use 'onion' instead.\n");
+ return NET_TOR;
+ }
return NET_UNROUTABLE;
}