diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -83,6 +83,14 @@ namespace GUIUtil { +/** + * Number of service flag bits to consider (from bit 0) for display in peer + * details view. Correspondig bits are whether translated to some human readable + * text (e.g. NODE_NETWORK is displayed as "NETWORK") or as "UNKNOWN" with the + * bit position. + */ +static const size_t SERVICE_FLAG_DISPLAY_BITS = 11; + QString dateTimeStr(const QDateTime &date) { return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); @@ -887,8 +895,8 @@ QString formatServicesStr(quint64 mask) { QStringList strList; - // Just scan the last 11 bits for now. - for (int i = 0; i < 11; i++) { + // Just scan the last SERVICE_FLAG_DISPLAY_BITS for now. + for (size_t i = 0; i < SERVICE_FLAG_DISPLAY_BITS; i++) { uint64_t check = 1 << i; if (mask & check) { switch (check) {