Accept addresses with NODE_NETWORK_LIMITED flag

This commit is contained in:
Jonas Schnelli 2017-10-13 21:17:51 -07:00
parent 67447ba060
commit 31c45a927e
No known key found for this signature in database
GPG Key ID: 1EB776BB03C7922D
2 changed files with 3 additions and 3 deletions

View File

@ -1801,7 +1801,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
// We only bother storing full nodes, though this may include // We only bother storing full nodes, though this may include
// things which we would not make an outbound connection to, in // things which we would not make an outbound connection to, in
// part because we may make feeler connections to them. // part because we may make feeler connections to them.
if (!MayHaveUsefulAddressDB(addr.nServices)) if (!MayHaveUsefulAddressDB(addr.nServices) && !HasAllDesirableServiceFlags(addr.nServices))
continue; continue;
if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)

View File

@ -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 * 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) { 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 */ /** A CService with information about it as peer */