Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 0) { | ||||
"in common with this peer\n" | "in common with this peer\n" | ||||
" \"inflight\": [\n" | " \"inflight\": [\n" | ||||
" n, (numeric) The heights of blocks " | " n, (numeric) The heights of blocks " | ||||
"we're currently asking from this peer\n" | "we're currently asking from this peer\n" | ||||
" ...\n" | " ...\n" | ||||
" ],\n" | " ],\n" | ||||
" \"whitelisted\": true|false, (boolean) Whether the peer is " | " \"whitelisted\": true|false, (boolean) Whether the peer is " | ||||
"whitelisted\n" | "whitelisted\n" | ||||
" \"minfeefilter\": n, (numeric) The minimum fee rate " | |||||
"for transactions this peer accepts\n" | |||||
" \"bytessent_per_msg\": {\n" | " \"bytessent_per_msg\": {\n" | ||||
" \"addr\": n, (numeric) The total bytes sent " | " \"addr\": n, (numeric) The total bytes sent " | ||||
"aggregated by message type\n" | "aggregated by message type\n" | ||||
" ...\n" | " ...\n" | ||||
" },\n" | " },\n" | ||||
" \"bytesrecv_per_msg\": {\n" | " \"bytesrecv_per_msg\": {\n" | ||||
" \"addr\": n, (numeric) The total bytes " | " \"addr\": n, (numeric) The total bytes " | ||||
"received aggregated by message type\n" | "received aggregated by message type\n" | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | for (const CNodeStats &stats : vstats) { | ||||
obj.pushKV("synced_blocks", statestats.nCommonHeight); | obj.pushKV("synced_blocks", statestats.nCommonHeight); | ||||
UniValue heights(UniValue::VARR); | UniValue heights(UniValue::VARR); | ||||
for (int height : statestats.vHeightInFlight) { | for (int height : statestats.vHeightInFlight) { | ||||
heights.push_back(height); | heights.push_back(height); | ||||
} | } | ||||
obj.pushKV("inflight", heights); | obj.pushKV("inflight", heights); | ||||
} | } | ||||
obj.pushKV("whitelisted", stats.fWhitelisted); | obj.pushKV("whitelisted", stats.fWhitelisted); | ||||
obj.pushKV("minfeefilter", ValueFromAmount(stats.minFeeFilter)); | |||||
UniValue sendPerMsgCmd(UniValue::VOBJ); | UniValue sendPerMsgCmd(UniValue::VOBJ); | ||||
for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) { | for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) { | ||||
if (i.second > 0) { | if (i.second > 0) { | ||||
sendPerMsgCmd.pushKV(i.first, i.second); | sendPerMsgCmd.pushKV(i.first, i.second); | ||||
} | } | ||||
} | } | ||||
obj.pushKV("bytessent_per_msg", sendPerMsgCmd); | obj.pushKV("bytessent_per_msg", sendPerMsgCmd); | ||||
▲ Show 20 Lines • Show All 586 Lines • Show Last 20 Lines |