|
1 |
| -// Copyright (c) 2009-2018 The Bitcoin Core developers |
| 1 | +// Copyright (c) 2009-2019 The Bitcoin Core developers |
2 | 2 | // Distributed under the MIT software license, see the accompanying
|
3 | 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
4 | 4 |
|
@@ -109,11 +109,15 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
109 | 109 | " \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n"
|
110 | 110 | " \"minfeefilter\": n, (numeric) The minimum fee rate for transactions this peer accepts\n"
|
111 | 111 | " \"bytessent_per_msg\": {\n"
|
112 |
| - " \"addr\": n, (numeric) The total bytes sent aggregated by message type\n" |
| 112 | + " \"msg\": n, (numeric) The total bytes sent aggregated by message type\n" |
| 113 | + " When a message type is not listed in this json object, the bytes sent are 0.\n" |
| 114 | + " Only known message types can appear as keys in the object.\n" |
113 | 115 | " ...\n"
|
114 | 116 | " },\n"
|
115 | 117 | " \"bytesrecv_per_msg\": {\n"
|
116 |
| - " \"addr\": n, (numeric) The total bytes received aggregated by message type\n" |
| 118 | + " \"msg\": n, (numeric) The total bytes received aggregated by message type\n" |
| 119 | + " When a message type is not listed in this json object, the bytes received are 0.\n" |
| 120 | + " 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" |
117 | 121 | " ...\n"
|
118 | 122 | " }\n"
|
119 | 123 | " }\n"
|
@@ -178,14 +182,14 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
178 | 182 | obj.pushKV("minfeefilter", ValueFromAmount(stats.minFeeFilter));
|
179 | 183 |
|
180 | 184 | UniValue sendPerMsgCmd(UniValue::VOBJ);
|
181 |
| - for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) { |
| 185 | + for (const auto& i : stats.mapSendBytesPerMsgCmd) { |
182 | 186 | if (i.second > 0)
|
183 | 187 | sendPerMsgCmd.pushKV(i.first, i.second);
|
184 | 188 | }
|
185 | 189 | obj.pushKV("bytessent_per_msg", sendPerMsgCmd);
|
186 | 190 |
|
187 | 191 | UniValue recvPerMsgCmd(UniValue::VOBJ);
|
188 |
| - for (const mapMsgCmdSize::value_type &i : stats.mapRecvBytesPerMsgCmd) { |
| 192 | + for (const auto& i : stats.mapRecvBytesPerMsgCmd) { |
189 | 193 | if (i.second > 0)
|
190 | 194 | recvPerMsgCmd.pushKV(i.first, i.second);
|
191 | 195 | }
|
|
0 commit comments