diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2019-01-09 16:41:37 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2019-01-13 22:50:36 -0800 |
commit | d6b076c17bc7d513243711563b262524ef0ba74c (patch) | |
tree | 0313896bea97550b6afe38e35f3fd657333ff550 /src/init.cpp | |
parent | 0ed279cb4e4198e20a552c279c09134626bbb0bd (diff) |
Drop IsLimited in favor of IsReachable
These two methods have had the same meaning, but inverted, since
110b62f06992d0fb989153afff2dc3aea62a674f. Having one name for a single
concept simplifies the code.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp index f4f00ea691..fa081f8ca1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1321,7 +1321,7 @@ bool AppInitMain(InitInterfaces& interfaces) for (int n = 0; n < NET_MAX; n++) { enum Network net = (enum Network)n; if (!nets.count(net)) - SetLimited(net); + SetReachable(net, false); } } @@ -1332,7 +1332,7 @@ bool AppInitMain(InitInterfaces& interfaces) // -proxy sets a proxy for all outgoing network traffic // -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default std::string proxyArg = gArgs.GetArg("-proxy", ""); - SetLimited(NET_ONION); + SetReachable(NET_ONION, false); if (proxyArg != "" && proxyArg != "0") { CService proxyAddr; if (!Lookup(proxyArg.c_str(), proxyAddr, 9050, fNameLookup)) { @@ -1347,7 +1347,7 @@ bool AppInitMain(InitInterfaces& interfaces) SetProxy(NET_IPV6, addrProxy); SetProxy(NET_ONION, addrProxy); SetNameProxy(addrProxy); - SetLimited(NET_ONION, false); // by default, -proxy sets onion as reachable, unless -noonion later + SetReachable(NET_ONION, true); // by default, -proxy sets onion as reachable, unless -noonion later } // -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses @@ -1356,7 +1356,7 @@ bool AppInitMain(InitInterfaces& interfaces) std::string onionArg = gArgs.GetArg("-onion", ""); if (onionArg != "") { if (onionArg == "0") { // Handle -noonion/-onion=0 - SetLimited(NET_ONION); // set onions as unreachable + SetReachable(NET_ONION, false); } else { CService onionProxy; if (!Lookup(onionArg.c_str(), onionProxy, 9050, fNameLookup)) { @@ -1366,7 +1366,7 @@ bool AppInitMain(InitInterfaces& interfaces) if (!addrOnion.IsValid()) return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg)); SetProxy(NET_ONION, addrOnion); - SetLimited(NET_ONION, false); + SetReachable(NET_ONION, true); } } |