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:
Vasil Dimov committed 2020-05-29 18:49:26 +02:00
1 parent f2e2c5ebcc
commit fbacad1880
4 files changed
+12 -6

No files matched your search

+1 -1
View File
@@ -759,7 +759,7 @@ QString formatServicesStr(quint64 mask)
uint64_t check = 1ull << i;
if (mask & check)
{
strList.append(QString::fromStdString(serviceFlagToStr(mask, i)));
strList.append(QString::fromStdString(serviceFlagToStr(i)));
}
}