mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +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:
@@ -847,7 +847,7 @@ UniValue GetServicesNames(ServiceFlags services)
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
const uint64_t mask = 1ull << i;
|
||||
if (services_n & mask) {
|
||||
servicesNames.push_back(serviceFlagToStr(mask, i));
|
||||
servicesNames.push_back(serviceFlagToStr(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user