Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 557 Lines • ▼ Show 20 Lines | static UniValue getnetworkinfo(const Config &config, | ||||
obj.push_back(Pair("timeoffset", GetTimeOffset())); | obj.push_back(Pair("timeoffset", GetTimeOffset())); | ||||
if (g_connman) { | if (g_connman) { | ||||
obj.push_back(Pair("networkactive", g_connman->GetNetworkActive())); | obj.push_back(Pair("networkactive", g_connman->GetNetworkActive())); | ||||
obj.push_back( | obj.push_back( | ||||
Pair("connections", | Pair("connections", | ||||
(int)g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL))); | (int)g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL))); | ||||
} | } | ||||
obj.push_back(Pair("networks", GetNetworksInfo())); | obj.push_back(Pair("networks", GetNetworksInfo())); | ||||
obj.push_back( | obj.push_back(Pair("relayfee", | ||||
Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()))); | ValueFromAmount(config.GetMinFeePerKB().GetFeePerK()))); | ||||
obj.push_back(Pair("excessutxocharge", | obj.push_back(Pair("excessutxocharge", | ||||
ValueFromAmount(config.GetExcessUTXOCharge()))); | ValueFromAmount(config.GetExcessUTXOCharge()))); | ||||
UniValue localAddresses(UniValue::VARR); | UniValue localAddresses(UniValue::VARR); | ||||
{ | { | ||||
LOCK(cs_mapLocalHost); | LOCK(cs_mapLocalHost); | ||||
for (const std::pair<CNetAddr, LocalServiceInfo> &item : mapLocalHost) { | for (const std::pair<CNetAddr, LocalServiceInfo> &item : mapLocalHost) { | ||||
UniValue rec(UniValue::VOBJ); | UniValue rec(UniValue::VOBJ); | ||||
rec.push_back(Pair("address", item.first.ToString())); | rec.push_back(Pair("address", item.first.ToString())); | ||||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |