Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
RPCResult::Type::OBJ, | RPCResult::Type::OBJ, | ||||
"", | "", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::NUM, "totalbytesrecv", | {RPCResult::Type::NUM, "totalbytesrecv", | ||||
"Total bytes received"}, | "Total bytes received"}, | ||||
{RPCResult::Type::NUM, "totalbytessent", "Total bytes sent"}, | {RPCResult::Type::NUM, "totalbytessent", "Total bytes sent"}, | ||||
{RPCResult::Type::NUM_TIME, "timemillis", | {RPCResult::Type::NUM_TIME, "timemillis", | ||||
"Current UNIX time in milliseconds"}, | "Current " + UNIX_EPOCH_TIME + " in milliseconds"}, | ||||
{RPCResult::Type::OBJ, | {RPCResult::Type::OBJ, | ||||
"uploadtarget", | "uploadtarget", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::NUM, "timeframe", | {RPCResult::Type::NUM, "timeframe", | ||||
"Length of the measuring timeframe in seconds"}, | "Length of the measuring timeframe in seconds"}, | ||||
{RPCResult::Type::NUM, "target", "Target in bytes"}, | {RPCResult::Type::NUM, "target", "Target in bytes"}, | ||||
{RPCResult::Type::BOOL, "target_reached", | {RPCResult::Type::BOOL, "target_reached", | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"the services we offer to the network, in human-readable form", | "the services we offer to the network, in human-readable form", | ||||
{ | { | ||||
{RPCResult::Type::STR, "SERVICE_NAME", "the service name"}, | {RPCResult::Type::STR, "SERVICE_NAME", "the service name"}, | ||||
}}, | }}, | ||||
{RPCResult::Type::BOOL, "localrelay", | {RPCResult::Type::BOOL, "localrelay", | ||||
"true if transaction relay is requested from peers"}, | "true if transaction relay is requested from peers"}, | ||||
{RPCResult::Type::NUM, "timeoffset", "the time offset"}, | {RPCResult::Type::NUM, "timeoffset", "the time offset"}, | ||||
{RPCResult::Type::NUM, "connections", | {RPCResult::Type::NUM, "connections", | ||||
"the number of connections"}, | "the total number of connections"}, | ||||
{RPCResult::Type::NUM, "connections_in", | |||||
"the number of inbound connections"}, | |||||
{RPCResult::Type::NUM, "connections_out", | |||||
"the number of outbound connections"}, | |||||
{RPCResult::Type::BOOL, "networkactive", | {RPCResult::Type::BOOL, "networkactive", | ||||
"whether p2p networking is enabled"}, | "whether p2p networking is enabled"}, | ||||
{RPCResult::Type::ARR, | {RPCResult::Type::ARR, | ||||
"networks", | "networks", | ||||
"information per network", | "information per network", | ||||
{ | { | ||||
{RPCResult::Type::OBJ, | {RPCResult::Type::OBJ, | ||||
"", | "", | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | if (node.connman) { | ||||
obj.pushKV("localservicesnames", GetServicesNames(services)); | obj.pushKV("localservicesnames", GetServicesNames(services)); | ||||
} | } | ||||
obj.pushKV("localrelay", g_relay_txes); | obj.pushKV("localrelay", g_relay_txes); | ||||
obj.pushKV("timeoffset", GetTimeOffset()); | obj.pushKV("timeoffset", GetTimeOffset()); | ||||
if (node.connman) { | if (node.connman) { | ||||
obj.pushKV("networkactive", node.connman->GetNetworkActive()); | obj.pushKV("networkactive", node.connman->GetNetworkActive()); | ||||
obj.pushKV("connections", | obj.pushKV("connections", | ||||
int(node.connman->GetNodeCount(CConnman::CONNECTIONS_ALL))); | int(node.connman->GetNodeCount(CConnman::CONNECTIONS_ALL))); | ||||
obj.pushKV("connections_in", | |||||
int(node.connman->GetNodeCount(CConnman::CONNECTIONS_IN))); | |||||
obj.pushKV("connections_out", | |||||
int(node.connman->GetNodeCount(CConnman::CONNECTIONS_OUT))); | |||||
} | } | ||||
obj.pushKV("networks", GetNetworksInfo()); | obj.pushKV("networks", GetNetworksInfo()); | ||||
obj.pushKV("relayfee", ::minRelayTxFee.GetFeePerK()); | obj.pushKV("relayfee", ::minRelayTxFee.GetFeePerK()); | ||||
obj.pushKV("excessutxocharge", config.GetExcessUTXOCharge()); | obj.pushKV("excessutxocharge", config.GetExcessUTXOCharge()); | ||||
UniValue localAddresses(UniValue::VARR); | UniValue localAddresses(UniValue::VARR); | ||||
{ | { | ||||
LOCK(cs_mapLocalHost); | LOCK(cs_mapLocalHost); | ||||
for (const std::pair<const CNetAddr, LocalServiceInfo> &item : | for (const std::pair<const CNetAddr, LocalServiceInfo> &item : | ||||
▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines |