[#PeerManager-GetDesirableServiceFlags]
= xref:PeerManager.adoc[PeerManager]::GetDesirableServiceFlags
:relfileprefix: ../
:mrdocs:

Gets the set of service flags which are &quot;desirable&quot; for a given peer&period;

== Synopsis

Declared in `&lt;net&lowbar;processing&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:ServiceFlags.adoc[ServiceFlags]
GetDesirableServiceFlags(xref:ServiceFlags.adoc[ServiceFlags] services) const = 0;
----

== Description

These are the flags which are required for a peer to support for them to be &quot;interesting&quot; 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&period;

Relevant service flags may be peer&hyphen; and state&hyphen;specific in that the version of the peer may determine which flags are required (eg in the case of NODE&lowbar;NETWORK&lowbar;LIMITED where we seek out NODE&lowbar;NETWORK peers unless they set NODE&lowbar;NETWORK&lowbar;LIMITED and we are out of IBD, in which case NODE&lowbar;NETWORK&lowbar;LIMITED suffices)&period;

Thus, generally, avoid calling with &apos;services&apos; &equals;&equals; NODE&lowbar;NONE, unless state&hyphen;specific flags must absolutely be avoided&period; When called with &apos;services&apos; &equals;&equals; NODE&lowbar;NONE, the returned desirable service flags are guaranteed to not change dependent on state &hyphen; 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&period;

== Return Value

The set of service flags considered desirable for such a peer&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *services*
| The peer&apos;s known service flags, or NODE&lowbar;NONE to request state&hyphen;independent flags&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
