aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2012-05-14 17:15:58 +0200
committerPieter Wuille <[email protected]>2012-05-14 17:52:45 +0200
commit0f1707de678a23b8600510be366289071203fc6e (patch)
tree86ad8eddb178c01da5d65983030ccceab30220d6 /src/net.cpp
parentMerge pull request #1291 from sipa/canonames (diff)
downloaddiscoin-0f1707de678a23b8600510be366289071203fc6e.tar.xz
discoin-0f1707de678a23b8600510be366289071203fc6e.zip
-onlynet instead of -blocknet
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 88578cdcb..e48b30095 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -245,14 +245,21 @@ bool AddLocal(const CNetAddr &addr, int nScore)
/** Make a particular network entirely off-limits (no automatic connects to it) */
void SetLimited(enum Network net, bool fLimited)
{
+ if (net == NET_UNROUTABLE)
+ return;
LOCK(cs_mapLocalHost);
vfLimited[net] = fLimited;
}
-bool IsLimited(const CNetAddr& addr)
+bool IsLimited(enum Network net)
{
LOCK(cs_mapLocalHost);
- return vfLimited[addr.GetNetwork()];
+ return vfLimited[net];
+}
+
+bool IsLimited(const CNetAddr &addr)
+{
+ return IsLimited(addr.GetNetwork());
}
/** vote for a local address */