Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 1,054 Lines • ▼ Show 20 Lines | static const CRPCCommand commands[] = { | ||||
{ "network", "setban", setban, {"subnet", "command", "bantime", "absolute"} }, | { "network", "setban", setban, {"subnet", "command", "bantime", "absolute"} }, | ||||
{ "network", "listbanned", listbanned, {} }, | { "network", "listbanned", listbanned, {} }, | ||||
{ "network", "clearbanned", clearbanned, {} }, | { "network", "clearbanned", clearbanned, {} }, | ||||
{ "network", "setnetworkactive", setnetworkactive, {"state"} }, | { "network", "setnetworkactive", setnetworkactive, {"state"} }, | ||||
{ "network", "getnodeaddresses", getnodeaddresses, {"count"} }, | { "network", "getnodeaddresses", getnodeaddresses, {"count"} }, | ||||
{ "hidden", "addpeeraddress", addpeeraddress, {"address", "port"} }, | { "hidden", "addpeeraddress", addpeeraddress, {"address", "port"} }, | ||||
}; | }; | ||||
// clang-format on | // clang-format on | ||||
for (const auto &c : commands) { | |||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | t.appendCommand(c.name, &c); | ||||
t.appendCommand(commands[vcidx].name, &commands[vcidx]); | |||||
} | } | ||||
} | } |