aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-01-14 14:22:47 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-01-14 14:30:51 +0100
commit43a79d22c1c05967da21a68ba4f2b5d63057d845 (patch)
tree706362b5cda36cec790e2a8f718ee84b1fc54ef3 /src/net.h
parenta9b71a09a0bbbdebc4c0b10d287bf2d53f628cf4 (diff)
parentd6b076c17bc7d513243711563b262524ef0ba74c (diff)
downloadbitcoin-43a79d22c1c05967da21a68ba4f2b5d63057d845.tar.xz
Merge #15138: Drop IsLimited in favor of IsReachable
d6b076c17bc7d513243711563b262524ef0ba74c Drop IsLimited in favor of IsReachable (Ben Woosley) Pull request description: These two methods have had the same meaning, but inverted, since 110b62f06992d0fb989153afff2dc3aea62a674f. Having one name for a single concept simplifies the code. This is a follow-up to #15051. /cc #7553 Tree-SHA512: 347ceb9e2a55ea06f4c01226411c7bbcade09dd82130e4c59d0824ecefd960875938022edbe5d4bfdf12b0552c9b4cb78b09a688284d707119571daf4eb371b4
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/net.h b/src/net.h
index 478f2958af..6d1bc0f8d0 100644
--- a/src/net.h
+++ b/src/net.h
@@ -520,17 +520,23 @@ enum
bool IsPeerAddrLocalGood(CNode *pnode);
void AdvertiseLocal(CNode *pnode);
-void SetLimited(enum Network net, bool fLimited = true);
-bool IsLimited(enum Network net);
-bool IsLimited(const CNetAddr& addr);
+
+/**
+ * Mark a network as reachable or unreachable (no automatic connects to it)
+ * @note Networks are reachable by default
+ */
+void SetReachable(enum Network net, bool reachable);
+/** @returns true if the network is reachable, false otherwise */
+bool IsReachable(enum Network net);
+/** @returns true if the address is in a reachable network, false otherwise */
+bool IsReachable(const CNetAddr& addr);
+
bool AddLocal(const CService& addr, int nScore = LOCAL_NONE);
bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
void RemoveLocal(const CService& addr);
bool SeenLocal(const CService& addr);
bool IsLocal(const CService& addr);
bool GetLocal(CService &addr, const CNetAddr *paddrPeer = nullptr);
-bool IsReachable(enum Network net);
-bool IsReachable(const CNetAddr &addr);
CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices);