diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2019-11-13 23:09:27 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2019-11-14 05:01:50 +0000 |
commit | df77de8c2157fbb4c0898586dacb2215286745c8 (patch) | |
tree | a6e4f7c1937d73eda7d0514f813441e5288dc3a4 /src/qt/guiutil.cpp | |
parent | 8afa602f308ef003bb6893718eae1fe5a830690c (diff) |
Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index c4e0321f28..54e7a9e0b9 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -819,9 +819,8 @@ QString formatServicesStr(quint64 mask) { QStringList strList; - // Just scan the last 8 bits for now. - for (int i = 0; i < 8; i++) { - uint64_t check = 1 << i; + for (int i = 0; i < 64; i++) { + uint64_t check = 1LL << i; if (mask & check) { switch (check) @@ -838,8 +837,15 @@ QString formatServicesStr(quint64 mask) case NODE_WITNESS: strList.append("WITNESS"); break; + case NODE_NETWORK_LIMITED: + strList.append("NETWORK_LIMITED"); + break; default: - strList.append(QString("%1[%2]").arg("UNKNOWN").arg(check)); + if (i < 8) { + strList.append(QString("%1[%2]").arg("UNKNOWN").arg(check)); + } else { + strList.append(QString("%1[2^%2]").arg("UNKNOWN").arg(i)); + } } } } |