Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/abc.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | static UniValue setexcessiveblock(Config &config, | ||||
// settingsToUserAgentString(); | // settingsToUserAgentString(); | ||||
std::ostringstream ret; | std::ostringstream ret; | ||||
ret << "Excessive Block set to " << ebs << " bytes."; | ret << "Excessive Block set to " << ebs << " bytes."; | ||||
return UniValue(ret.str()); | return UniValue(ret.str()); | ||||
} | } | ||||
// clang-format off | // clang-format off | ||||
static const ContextFreeRPCCommand commands[] = { | static const ContextFreeRPCCommand commands[] = { | ||||
// category name actor (function) okSafeMode | // category name actor (function) argNames | ||||
// ------------------- ------------------------ ---------------------- ---------- | // ------------------- ------------------------ ---------------------- ---------- | ||||
{ "network", "getexcessiveblock", getexcessiveblock, true, {}}, | { "network", "getexcessiveblock", getexcessiveblock, {}}, | ||||
{ "network", "setexcessiveblock", setexcessiveblock, true, {"maxBlockSize"}}, | { "network", "setexcessiveblock", setexcessiveblock, {"maxBlockSize"}}, | ||||
}; | }; | ||||
// clang-format on | // clang-format on | ||||
void RegisterABCRPCCommands(CRPCTable &t) { | void RegisterABCRPCCommands(CRPCTable &t) { | ||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | ||||
t.appendCommand(commands[vcidx].name, &commands[vcidx]); | t.appendCommand(commands[vcidx].name, &commands[vcidx]); | ||||
} | } | ||||
} | } |