|
|
|
@ -512,15 +512,15 @@ static RPCHelpMan getaddednodeinfo()
|
|
|
|
|
static RPCHelpMan getnettotals()
|
|
|
|
|
{
|
|
|
|
|
return RPCHelpMan{"getnettotals",
|
|
|
|
|
"\nReturns information about network traffic, including bytes in, bytes out,\n"
|
|
|
|
|
"and current time.\n",
|
|
|
|
|
{},
|
|
|
|
|
"Returns information about network traffic, including bytes in, bytes out,\n"
|
|
|
|
|
"and current system time.",
|
|
|
|
|
{},
|
|
|
|
|
RPCResult{
|
|
|
|
|
RPCResult::Type::OBJ, "", "",
|
|
|
|
|
{
|
|
|
|
|
{RPCResult::Type::NUM, "totalbytesrecv", "Total bytes received"},
|
|
|
|
|
{RPCResult::Type::NUM, "totalbytessent", "Total bytes sent"},
|
|
|
|
|
{RPCResult::Type::NUM_TIME, "timemillis", "Current " + UNIX_EPOCH_TIME + " in milliseconds"},
|
|
|
|
|
{RPCResult::Type::NUM_TIME, "timemillis", "Current system " + UNIX_EPOCH_TIME + " in milliseconds"},
|
|
|
|
|
{RPCResult::Type::OBJ, "uploadtarget", "",
|
|
|
|
|
{
|
|
|
|
|
{RPCResult::Type::NUM, "timeframe", "Length of the measuring timeframe in seconds"},
|
|
|
|
@ -544,7 +544,7 @@ static RPCHelpMan getnettotals()
|
|
|
|
|
UniValue obj(UniValue::VOBJ);
|
|
|
|
|
obj.pushKV("totalbytesrecv", connman.GetTotalBytesRecv());
|
|
|
|
|
obj.pushKV("totalbytessent", connman.GetTotalBytesSent());
|
|
|
|
|
obj.pushKV("timemillis", GetTimeMillis());
|
|
|
|
|
obj.pushKV("timemillis", TicksSinceEpoch<std::chrono::milliseconds>(SystemClock::now()));
|
|
|
|
|
|
|
|
|
|
UniValue outboundLimit(UniValue::VOBJ);
|
|
|
|
|
outboundLimit.pushKV("timeframe", count_seconds(connman.GetMaxOutboundTimeframe()));
|
|
|
|
|