mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #19112: rpc: Remove special case for unknown service flags
fa1433ac1brpc: 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: ACKfa1433ac1bTree-SHA512: 942de6a577a9ee076ce12c92be121617640d53ee8c3424064c45a30a7ff789555d3722a4203670768faf81da2a40adfed3ec5cdeb5da06f04be81ddb53b9db7e
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user