Skip to content

Commit

Permalink
Log warning message when deprecated network name 'tor' is used (e.g. …
Browse files Browse the repository at this point in the history
…option onlynet=tor)
  • Loading branch information
wodry committed Jun 24, 2018
1 parent 3a45493 commit 9f8c54b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/netbase.cpp
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 9f8c54b

Please sign in to comment.