diff options
| author | marcaiaf <[email protected]> | 2018-12-28 16:20:30 +0100 |
|---|---|---|
| committer | marcaiaf <[email protected]> | 2018-12-28 16:20:30 +0100 |
| commit | 6dc4593db1ccfb8745b2daa42f457981ae08dba9 (patch) | |
| tree | 1f4ce54fbe9a0f35dc7b6a0ec74d188b5b3c314b /src/net.cpp | |
| parent | Merge #14653: rpcwallet: Add missing transaction categories to rpc helptexts (diff) | |
| download | discoin-6dc4593db1ccfb8745b2daa42f457981ae08dba9.tar.xz discoin-6dc4593db1ccfb8745b2daa42f457981ae08dba9.zip | |
IsReachable is the inverse of IsLimited (DRY). Includes unit tests
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp index e595fb0b0..a0f66d06d 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -286,15 +286,13 @@ bool IsLocal(const CService& addr) /** check whether a given network is one we can probably connect to */ bool IsReachable(enum Network net) { - LOCK(cs_mapLocalHost); - return !vfLimited[net]; + return !IsLimited(net); } /** check whether a given address is in a network we can probably connect to */ bool IsReachable(const CNetAddr& addr) { - enum Network net = addr.GetNetwork(); - return IsReachable(net); + return IsReachable(addr.GetNetwork()); } |