aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-06-04 17:09:53 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-06-04 17:16:49 +0200
commit365f1082e1e6ff1c2f53552c3871223e87a9d43f (patch)
treef664cac4cd958f406716841486affa02696446dc /src
parent011fe009f9eeeb71ab958ab53df716438871d26e (diff)
parentfa1433ac1be8481f08c1a0a311a6b87d8a874c6a (diff)
Merge #19112: rpc: Remove special case for unknown service flags
fa1433ac1be8481f08c1a0a311a6b87d8a874c6a rpc: Remove special case for unknown service flags (MarcoFalke) Pull request description: The special case to return a bit as an integer is clumsy and undocumented. Probably also irrelevant because there shouldn't currently be a non-misbehaving client that connects to Bitcoin Core and advertises an unknown service flag. Thus, simply remove the code. ACKs for top commit: laanwj: ACK fa1433ac1be8481f08c1a0a311a6b87d8a874c6a Tree-SHA512: 942de6a577a9ee076ce12c92be121617640d53ee8c3424064c45a30a7ff789555d3722a4203670768faf81da2a40adfed3ec5cdeb5da06f04be81ddb53b9db7e
Diffstat (limited to 'src')
-rw-r--r--src/protocol.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 83a24b9d95..2dfe4bee74 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -5,8 +5,8 @@
#include <protocol.h>
-#include <util/system.h>
#include <util/strencodings.h>
+#include <util/system.h>
#ifndef WIN32
# include <arpa/inet.h>
@@ -220,11 +220,7 @@ static std::string serviceFlagToStr(size_t bit)
std::ostringstream stream;
stream.imbue(std::locale::classic());
stream << "UNKNOWN[";
- if (bit < 8) {
- stream << service_flag;
- } else {
- stream << "2^" << bit;
- }
+ stream << "2^" << bit;
stream << "]";
return stream.str();
}