Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 561 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()))); | ||||
obj.push_back(Pair("incrementalfee", | obj.push_back(Pair("incrementalfee", | ||||
ValueFromAmount(::incrementalRelayFee.GetFeePerK()))); | ValueFromAmount(::incrementalRelayFee.GetFeePerK()))); | ||||
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) { | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |