aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-10-13 21:17:51 -0700
committerJonas Schnelli <dev@jonasschnelli.ch>2018-02-09 19:56:07 +1100
commit31c45a927eaac934fb237433f156907092bf1d11 (patch)
treebd56a61a56a182b2fb8078c0c058a14919e06e4e
parent67447ba06057b8e83f962c82491d2fe6c5211f50 (diff)
Accept addresses with NODE_NETWORK_LIMITED flag
-rw-r--r--src/net_processing.cpp2
-rw-r--r--src/protocol.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index fc0ba82d8b..f633712912 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1801,7 +1801,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
// We only bother storing full nodes, though this may include
// things which we would not make an outbound connection to, in
// part because we may make feeler connections to them.
- if (!MayHaveUsefulAddressDB(addr.nServices))
+ if (!MayHaveUsefulAddressDB(addr.nServices) && !HasAllDesirableServiceFlags(addr.nServices))
continue;
if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
diff --git a/src/protocol.h b/src/protocol.h
index 42eb57e4f0..ec5f55e4f6 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -316,10 +316,10 @@ static inline bool HasAllDesirableServiceFlags(ServiceFlags services) {
/**
* Checks if a peer with the given service flags may be capable of having a
- * robust address-storage DB. Currently an alias for checking NODE_NETWORK.
+ * robust address-storage DB.
*/
static inline bool MayHaveUsefulAddressDB(ServiceFlags services) {
- return services & NODE_NETWORK;
+ return (services & NODE_NETWORK) || (services & NODE_NETWORK_LIMITED);
}
/** A CService with information about it as peer */