Skip to content

Commit 9f8c54b

Browse files
author
wodry
committed
Log warning message when deprecated network name 'tor' is used (e.g. option onlynet=tor)
1 parent 3a45493 commit 9f8c54b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/netbase.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ enum Network ParseNetwork(std::string net) {
4141
boost::to_lower(net);
4242
if (net == "ipv4") return NET_IPV4;
4343
if (net == "ipv6") return NET_IPV6;
44-
if (net == "tor" || net == "onion") return NET_TOR;
44+
if (net == "onion") return NET_TOR;
45+
if (net == "tor") {
46+
LogPrintf("Warning: net name 'tor' is deprecated and will be removed in the future. You should use 'onion' instead.\n");
47+
return NET_TOR;
48+
}
4549
return NET_UNROUTABLE;
4650
}
4751

0 commit comments

Comments
 (0)