mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
util: simplify the interface of serviceFlagToStr()
Don't take two redundant arguments in `serviceFlagToStr()`. As a side effect this fixes an issue introduced in https://github.com/bitcoin/bitcoin/pull/18165 due to which the GUI could print something like `UNKNOWN[1033] & UNKNOWN[1033] & UNKNOWN[2^10]` instead of `NETWORK & WITNESS`.
This commit is contained in:
@@ -288,7 +288,12 @@ enum ServiceFlags : uint64_t {
|
||||
// BIP process.
|
||||
};
|
||||
|
||||
std::string serviceFlagToStr(uint64_t mask, int bit);
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
std::string serviceFlagToStr(size_t bit);
|
||||
|
||||
/**
|
||||
* Gets the set of service flags which are "desirable" for a given peer.
|
||||
|
||||
Reference in New Issue
Block a user