Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 312 Lines • ▼ Show 20 Lines | |||||
* their connection around. | * their connection around. | ||||
* | * | ||||
* Relevant service flags may be peer- and state-specific in that the | * Relevant service flags may be peer- and state-specific in that the | ||||
* version of the peer may determine which flags are required (eg in the | * version of the peer may determine which flags are required (eg in the | ||||
* case of NODE_NETWORK_LIMITED where we seek out NODE_NETWORK peers | * case of NODE_NETWORK_LIMITED where we seek out NODE_NETWORK peers | ||||
* unless they set NODE_NETWORK_LIMITED and we are out of IBD, in which | * unless they set NODE_NETWORK_LIMITED and we are out of IBD, in which | ||||
* case NODE_NETWORK_LIMITED suffices). | * case NODE_NETWORK_LIMITED suffices). | ||||
* | * | ||||
* Thus, generally, avoid calling with peerServices == NODE_NONE. | * Thus, generally, avoid calling with peerServices == NODE_NONE, unless | ||||
* state-specific flags must absolutely be avoided. When called with | |||||
* peerServices == NODE_NONE, the returned desirable service flags are | |||||
* guaranteed to not change dependant on state - ie they are suitable for | |||||
* use when describing peers which we know to be desirable, but for which | |||||
* we do not have a confirmed set of service flags. | |||||
* | |||||
* If the NODE_NONE return value is changed, contrib/seeds/makeseeds.py | |||||
* should be updated appropriately to filter for the same nodes. | |||||
*/ | */ | ||||
static ServiceFlags GetDesirableServiceFlags(ServiceFlags services) { | static ServiceFlags GetDesirableServiceFlags(ServiceFlags services) { | ||||
return ServiceFlags(NODE_NETWORK); | return ServiceFlags(NODE_NETWORK); | ||||
} | } | ||||
/** | /** | ||||
* A shortcut for (services & GetDesirableServiceFlags(services)) | * A shortcut for (services & GetDesirableServiceFlags(services)) | ||||
* == GetDesirableServiceFlags(services), ie determines whether the given | * == GetDesirableServiceFlags(services), ie determines whether the given | ||||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |