diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-03-11 08:25:18 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-03-11 08:25:28 +0100 |
| commit | 9f14e5ad918d2f6e94e1d60eab4ef8464202fbdd (patch) | |
| tree | c0a4b44db17fb01369d2ec8100b959ca37a022da /src/net.cpp | |
| parent | Merge #7592: mempool: Re-remove ERROR logging for mempool rejects (diff) | |
| parent | Remove vfReachable and modify IsReachable to only use vfLimited. (diff) | |
| download | discoin-9f14e5ad918d2f6e94e1d60eab4ef8464202fbdd.tar.xz discoin-9f14e5ad918d2f6e94e1d60eab4ef8464202fbdd.zip | |
Merge #7553: Remove vfReachable and modify IsReachable to only use vfLimited.
110b62f Remove vfReachable and modify IsReachable to only use vfLimited. (Patrick Strateman)
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/net.cpp b/src/net.cpp index e06e5255d..b589692d1 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -79,7 +79,6 @@ bool fListen = true; uint64_t nLocalServices = NODE_NETWORK; CCriticalSection cs_mapLocalHost; map<CNetAddr, LocalServiceInfo> mapLocalHost; -static bool vfReachable[NET_MAX] = {}; static bool vfLimited[NET_MAX] = {}; static CNode* pnodeLocalHost = NULL; uint64_t nLocalHostNonce = 0; @@ -226,14 +225,6 @@ void AdvertiseLocal(CNode *pnode) } } -void SetReachable(enum Network net, bool fFlag) -{ - LOCK(cs_mapLocalHost); - vfReachable[net] = fFlag; - if (net == NET_IPV6 && fFlag) - vfReachable[NET_IPV4] = true; -} - // learn a new local address bool AddLocal(const CService& addr, int nScore) { @@ -256,7 +247,6 @@ bool AddLocal(const CService& addr, int nScore) info.nScore = nScore + (fAlready ? 1 : 0); info.nPort = addr.GetPort(); } - SetReachable(addr.GetNetwork()); } return true; @@ -319,7 +309,7 @@ bool IsLocal(const CService& addr) bool IsReachable(enum Network net) { LOCK(cs_mapLocalHost); - return vfReachable[net] && !vfLimited[net]; + return !vfLimited[net]; } /** check whether a given address is in a network we can probably connect to */ |