| Gets the set of service flags which are
| “desirable” for a given peer.
|
| These are the flags which are required
| for a peer to support for them to be “interesting”
| to us, ie for us to wish to use one of our
| few outbound connection slots for or
| for us to wish to prioritize keeping
| their connection around.
|
| 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 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 case NODE_NETWORK_LIMITED
| suffices).
|
| 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 dependent 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.
|
| A shortcut for (services & GetDesirableServiceFlags(services))
| == GetDesirableServiceFlags(services),
| ie determines whether the given set
| of service flags are sufficient for
| a peer to be “relevant”.
|
| Checks if a peer with the given service
| flags may be capable of having a robust
| address-storage DB.
|
| Convert a service flag (NODE_*) to a
| human readable string.
|
| It supports unknown service flags which
| will be returned as “UNKNOWN[…]”.
|
| ———–
| @param[in] bit
|
| the service flag is calculated as (1
| << bit)
|
| Convert service flags (a bitmask of
| NODE_) to human readable strings.
|
| It supports unknown service flags which
| will be returned as “UNKNOWN[…]”.
|
| ———–
| @param[in] flags
|
| multiple NODE_ bitwise-OR-ed together
|