diff options
| author | Wladimir J. van der Laan <[email protected]> | 2020-06-04 17:09:53 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2020-06-04 17:16:49 +0200 |
| commit | 365f1082e1e6ff1c2f53552c3871223e87a9d43f (patch) | |
| tree | f664cac4cd958f406716841486affa02696446dc /src/protocol.cpp | |
| parent | Merge #17994: validation: flush undo files after last block write (diff) | |
| parent | rpc: Remove special case for unknown service flags (diff) | |
| download | discoin-365f1082e1e6ff1c2f53552c3871223e87a9d43f.tar.xz discoin-365f1082e1e6ff1c2f53552c3871223e87a9d43f.zip | |
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/protocol.cpp')
| -rw-r--r-- | src/protocol.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 83a24b9d9..2dfe4bee7 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(); } |