Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
{RPCResult::Type::NUM, "version", | {RPCResult::Type::NUM, "version", | ||||
"The peer version, such as 70001"}, | "The peer version, such as 70001"}, | ||||
{RPCResult::Type::STR, "subver", "The string version"}, | {RPCResult::Type::STR, "subver", "The string version"}, | ||||
{RPCResult::Type::BOOL, "inbound", | {RPCResult::Type::BOOL, "inbound", | ||||
"Inbound (true) or Outbound (false)"}, | "Inbound (true) or Outbound (false)"}, | ||||
{RPCResult::Type::BOOL, "addnode", | {RPCResult::Type::BOOL, "addnode", | ||||
"Whether connection was due to addnode/-connect or if it " | "Whether connection was due to addnode/-connect or if it " | ||||
"was an automatic/inbound connection"}, | "was an automatic/inbound connection"}, | ||||
{RPCResult::Type::STR, "connection_type", | |||||
"Type of connection: \n" + | |||||
Join(CONNECTION_TYPE_DOC, ",\n") + "."}, | |||||
{RPCResult::Type::NUM, "startingheight", | {RPCResult::Type::NUM, "startingheight", | ||||
"The starting height (block) of the peer"}, | "The starting height (block) of the peer"}, | ||||
{RPCResult::Type::NUM, "banscore", | {RPCResult::Type::NUM, "banscore", | ||||
"The ban score (DEPRECATED, returned only if config " | "The ban score (DEPRECATED, returned only if config " | ||||
"option -deprecatedrpc=banscore is passed)"}, | "option -deprecatedrpc=banscore is passed)"}, | ||||
{RPCResult::Type::NUM, "synced_headers", | {RPCResult::Type::NUM, "synced_headers", | ||||
"The last header we have in common with this peer"}, | "The last header we have in common with this peer"}, | ||||
{RPCResult::Type::NUM, "synced_blocks", | {RPCResult::Type::NUM, "synced_blocks", | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
UniValue recvPerMsgCmd(UniValue::VOBJ); | UniValue recvPerMsgCmd(UniValue::VOBJ); | ||||
for (const auto &i : stats.mapRecvBytesPerMsgCmd) { | for (const auto &i : stats.mapRecvBytesPerMsgCmd) { | ||||
if (i.second > 0) { | if (i.second > 0) { | ||||
recvPerMsgCmd.pushKV(i.first, i.second); | recvPerMsgCmd.pushKV(i.first, i.second); | ||||
} | } | ||||
} | } | ||||
obj.pushKV("bytesrecv_per_msg", recvPerMsgCmd); | obj.pushKV("bytesrecv_per_msg", recvPerMsgCmd); | ||||
obj.pushKV("connection_type", stats.m_conn_type_string); | |||||
ret.push_back(obj); | ret.push_back(obj); | ||||
} | } | ||||
return ret; | return ret; | ||||
}, | }, | ||||
}; | }; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 784 Lines • Show Last 20 Lines |