From fbacad1880341ace31f669530c66d4e322d19235 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 29 May 2020 18:49:26 +0200 Subject: 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`. --- src/rpc/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rpc') diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 0e13d8dfce..6cd4c2664d 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -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)); } } -- cgit v1.2.3