mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
rpc: Document bytessent_per_msg and bytesrecv_per_msg
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -109,11 +109,15 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
" \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n"
|
||||
" \"minfeefilter\": n, (numeric) The minimum fee rate for transactions this peer accepts\n"
|
||||
" \"bytessent_per_msg\": {\n"
|
||||
" \"addr\": n, (numeric) The total bytes sent aggregated by message type\n"
|
||||
" \"msg\": n, (numeric) The total bytes sent aggregated by message type\n"
|
||||
" When a message type is not listed in this json object, the bytes sent are 0.\n"
|
||||
" Only known message types can appear as keys in the object.\n"
|
||||
" ...\n"
|
||||
" },\n"
|
||||
" \"bytesrecv_per_msg\": {\n"
|
||||
" \"addr\": n, (numeric) The total bytes received aggregated by message type\n"
|
||||
" \"msg\": n, (numeric) 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 of unknown message types are listed under '"+NET_MESSAGE_COMMAND_OTHER+"'.\n"
|
||||
" ...\n"
|
||||
" }\n"
|
||||
" }\n"
|
||||
@@ -178,14 +182,14 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
obj.pushKV("minfeefilter", ValueFromAmount(stats.minFeeFilter));
|
||||
|
||||
UniValue sendPerMsgCmd(UniValue::VOBJ);
|
||||
for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) {
|
||||
for (const auto& i : stats.mapSendBytesPerMsgCmd) {
|
||||
if (i.second > 0)
|
||||
sendPerMsgCmd.pushKV(i.first, i.second);
|
||||
}
|
||||
obj.pushKV("bytessent_per_msg", sendPerMsgCmd);
|
||||
|
||||
UniValue recvPerMsgCmd(UniValue::VOBJ);
|
||||
for (const mapMsgCmdSize::value_type &i : stats.mapRecvBytesPerMsgCmd) {
|
||||
for (const auto& i : stats.mapRecvBytesPerMsgCmd) {
|
||||
if (i.second > 0)
|
||||
recvPerMsgCmd.pushKV(i.first, i.second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user