aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.h
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2020-05-29 18:52:59 +0200
committerVasil Dimov <vd@FreeBSD.org>2020-05-29 18:59:37 +0200
commit189ae0c38b7d4927c5c73b94664e9542b2b06ed9 (patch)
tree5c2e119d4e08d23351a53f15c558ebc6178a863b /src/protocol.h
parentfbacad1880341ace31f669530c66d4e322d19235 (diff)
downloadbitcoin-189ae0c38b7d4927c5c73b94664e9542b2b06ed9.tar.xz
util: dedup code in callers of serviceFlagToStr()
Introduce `serviceFlagsToStr()` which hides the internals of the bitmask and simplifies callers of `serviceFlagToStr()`.
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.h b/src/protocol.h
index 4fb4594fbb..b720a6ce91 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -289,11 +289,11 @@ enum ServiceFlags : uint64_t {
};
/**
- * Convert a service flag (NODE_*) to a human readable string.
+ * Convert service flags (a bitmask of NODE_*) to human readable strings.
* It supports unknown service flags which will be returned as "UNKNOWN[...]".
- * @param[in] bit the service flag is calculated as (1 << bit)
+ * @param[in] flags multiple NODE_* bitwise-OR-ed together
*/
-std::string serviceFlagToStr(size_t bit);
+std::vector<std::string> serviceFlagsToStr(uint64_t flags);
/**
* Gets the set of service flags which are "desirable" for a given peer.