diff options
Diffstat (limited to 'src/protocol.h')
-rw-r--r-- | src/protocol.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/protocol.h b/src/protocol.h index f61b724b74..985f44640b 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -268,7 +268,7 @@ const std::vector<std::string>& getAllNetMessageTypes(); /** nServices flags */ enum ServiceFlags : uint64_t { - // NOTE: When adding here, be sure to update qt/guiutil.cpp's formatServicesStr too + // NOTE: When adding here, be sure to update serviceFlagToStr too // Nothing NODE_NONE = 0, // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently @@ -300,6 +300,13 @@ enum ServiceFlags : uint64_t { }; /** + * 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 + */ +std::vector<std::string> serviceFlagsToStr(uint64_t flags); + +/** * 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 |