mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Merge bitcoin/bitcoin#24141: Rename message_command variables in src/net* and src/rpc/net.cpp
e71c51b27drefactor: rename command -> message type in comments in the src/net* files (Shashwat)2b09593bddscripted-diff: Rename message command to message type (Shashwat) Pull request description: This PR is a follow-up to #24078. > a message is not a command, but simply a message of some type The first commit covers the message_command variable name and comments not addressed in the original PR in `src/net*` files. The second commit goes beyond the original `src/net*` limit of #24078 and does similar changes in the `src/rpc/net.cpp` file. ACKs for top commit: MarcoFalke: review ACKe71c51b27d💥 Tree-SHA512: 24015d132c00f15239e5d3dc7aedae904ae3103a90920bb09e984ff57723402763f697d886322f78e42a0cb46808cb6bc9d4905561dc6ddee9961168f8324b05
This commit is contained in:
@@ -156,7 +156,7 @@ static RPCHelpMan getpeerinfo()
|
||||
{RPCResult::Type::NUM, "msg", "The total bytes received aggregated by message type\n"
|
||||
"When a message type is not listed in this json object, the bytes received are 0.\n"
|
||||
"Only known message types can appear as keys in the object and all bytes received\n"
|
||||
"of unknown message types are listed under '"+NET_MESSAGE_COMMAND_OTHER+"'."}
|
||||
"of unknown message types are listed under '"+NET_MESSAGE_TYPE_OTHER+"'."}
|
||||
}},
|
||||
{RPCResult::Type::STR, "connection_type", "Type of connection: \n" + Join(CONNECTION_TYPE_DOC, ",\n") + ".\n"
|
||||
"Please note this output is unlikely to be stable in upcoming releases as we iterate to\n"
|
||||
@@ -243,19 +243,19 @@ static RPCHelpMan getpeerinfo()
|
||||
}
|
||||
obj.pushKV("permissions", permissions);
|
||||
|
||||
UniValue sendPerMsgCmd(UniValue::VOBJ);
|
||||
for (const auto& i : stats.mapSendBytesPerMsgCmd) {
|
||||
UniValue sendPerMsgType(UniValue::VOBJ);
|
||||
for (const auto& i : stats.mapSendBytesPerMsgType) {
|
||||
if (i.second > 0)
|
||||
sendPerMsgCmd.pushKV(i.first, i.second);
|
||||
sendPerMsgType.pushKV(i.first, i.second);
|
||||
}
|
||||
obj.pushKV("bytessent_per_msg", sendPerMsgCmd);
|
||||
obj.pushKV("bytessent_per_msg", sendPerMsgType);
|
||||
|
||||
UniValue recvPerMsgCmd(UniValue::VOBJ);
|
||||
for (const auto& i : stats.mapRecvBytesPerMsgCmd) {
|
||||
UniValue recvPerMsgType(UniValue::VOBJ);
|
||||
for (const auto& i : stats.mapRecvBytesPerMsgType) {
|
||||
if (i.second > 0)
|
||||
recvPerMsgCmd.pushKV(i.first, i.second);
|
||||
recvPerMsgType.pushKV(i.first, i.second);
|
||||
}
|
||||
obj.pushKV("bytesrecv_per_msg", recvPerMsgCmd);
|
||||
obj.pushKV("bytesrecv_per_msg", recvPerMsgType);
|
||||
obj.pushKV("connection_type", ConnectionTypeAsString(stats.m_conn_type));
|
||||
|
||||
ret.push_back(obj);
|
||||
|
||||
Reference in New Issue
Block a user