Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/abc.cpp
Show All 33 Lines | static UniValue setexcessiveblock(Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
if (request.fHelp || request.params.size() != 1) { | if (request.fHelp || request.params.size() != 1) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
"setexcessiveblock", | "setexcessiveblock", | ||||
"\nSet the excessive block size. Excessive blocks will not be used " | "\nSet the excessive block size. Excessive blocks will not be used " | ||||
"in the active chain or relayed. This discourages the propagation " | "in the active chain or relayed. This discourages the propagation " | ||||
"of blocks that you consider excessively large.", | "of blocks that you consider excessively large.", | ||||
{ | { | ||||
{"blockSize", RPCArg::Type::NUM, /* opt */ false, | {"blockSize", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
/* default_value */ "", | |||||
"Excessive block size in bytes. Must be greater than " + | "Excessive block size in bytes. Must be greater than " + | ||||
std::to_string(LEGACY_MAX_BLOCK_SIZE) + "."}, | std::to_string(LEGACY_MAX_BLOCK_SIZE) + "."}, | ||||
}, | }, | ||||
RPCResult{" blockSize (integer) excessive block size in bytes\n"}, | RPCResult{" blockSize (integer) excessive block size in bytes\n"}, | ||||
RPCExamples{HelpExampleCli("setexcessiveblock", "25000000") + | RPCExamples{HelpExampleCli("setexcessiveblock", "25000000") + | ||||
HelpExampleRpc("setexcessiveblock", "25000000")}, | HelpExampleRpc("setexcessiveblock", "25000000")}, | ||||
} | } | ||||
.ToString()); | .ToString()); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |