Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | UniValue localAddresses(UniValue::VARR); | ||||
UniValue rec(UniValue::VOBJ); | UniValue rec(UniValue::VOBJ); | ||||
rec.pushKV("address", item.first.ToString()); | rec.pushKV("address", item.first.ToString()); | ||||
rec.pushKV("port", item.second.nPort); | rec.pushKV("port", item.second.nPort); | ||||
rec.pushKV("score", item.second.nScore); | rec.pushKV("score", item.second.nScore); | ||||
localAddresses.push_back(rec); | localAddresses.push_back(rec); | ||||
} | } | ||||
} | } | ||||
obj.pushKV("localaddresses", localAddresses); | obj.pushKV("localaddresses", localAddresses); | ||||
obj.pushKV("warnings", GetWarnings("statusbar")); | obj.pushKV("warnings", GetWarnings(false)); | ||||
return obj; | return obj; | ||||
} | } | ||||
static UniValue setban(const Config &config, const JSONRPCRequest &request) { | static UniValue setban(const Config &config, const JSONRPCRequest &request) { | ||||
const RPCHelpMan help{ | const RPCHelpMan help{ | ||||
"setban", | "setban", | ||||
"Attempts to add or remove an IP/Subnet from the banned list.\n", | "Attempts to add or remove an IP/Subnet from the banned list.\n", | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |