Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | static UniValue getnetworkinfo(const Config &config, | ||||
obj.pushKV("localaddresses", localAddresses); | obj.pushKV("localaddresses", localAddresses); | ||||
obj.pushKV("warnings", GetWarnings("statusbar")); | obj.pushKV("warnings", GetWarnings("statusbar")); | ||||
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", | ||||
"\nAttempts to add or remove an IP/Subnet from the banned list.\n" | "\nAttempts to add or remove an IP/Subnet from the banned list.\n", | ||||
"Peers that are automatically banned cannot be unbanned.\n", | |||||
{ | { | ||||
{"subnet", RPCArg::Type::STR, RPCArg::Optional::NO, | {"subnet", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"The IP/Subnet (see getpeerinfo for nodes IP) with an optional " | "The IP/Subnet (see getpeerinfo for nodes IP) with an optional " | ||||
"netmask (default is /32 = single IP)"}, | "netmask (default is /32 = single IP)"}, | ||||
{"command", RPCArg::Type::STR, RPCArg::Optional::NO, | {"command", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"'add' to add an IP/Subnet to the list, 'remove' to remove an " | "'add' to add an IP/Subnet to the list, 'remove' to remove an " | ||||
"IP/Subnet from the list"}, | "IP/Subnet from the list"}, | ||||
{"bantime", RPCArg::Type::NUM, /* default */ "0", | {"bantime", RPCArg::Type::NUM, /* default */ "0", | ||||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |