Bitcoin ABC 0.30.5
P2P Digital Currency
abc.cpp
Go to the documentation of this file.
1// Copyright (c) 2017-2020 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <config.h>
6#include <rpc/server.h>
7#include <rpc/util.h>
8
9#include <univalue.h>
10
12 return RPCHelpMan{
13 "getexcessiveblock",
14 "Return the excessive block size.",
15 {},
17 "",
18 "",
19 {
21 "excessive block size in bytes"},
22 }},
23 RPCExamples{HelpExampleCli("getexcessiveblock", "") +
24 HelpExampleRpc("getexcessiveblock", "")},
25 [&](const RPCHelpMan &self, const Config &config,
26 const JSONRPCRequest &request) -> UniValue {
28 ret.pushKV("excessiveBlockSize", config.GetMaxBlockSize());
29 return ret;
30 },
31 };
32}
33
35 // clang-format off
36 static const CRPCCommand commands[] = {
37 // category actor (function)
38 // ------------------ ----------------------
39 { "network", getexcessiveblock, },
40 };
41 // clang-format on
42
43 for (const auto &c : commands) {
44 t.appendCommand(c.name, &c);
45 }
46}
void RegisterABCRPCCommands(CRPCTable &t)
Definition: abc.cpp:34
static RPCHelpMan getexcessiveblock()
Definition: abc.cpp:11
RPC command dispatcher.
Definition: server.h:194
void appendCommand(const std::string &name, const CRPCCommand *pcmd)
Appends a CRPCCommand to the dispatch table.
Definition: server.cpp:327
Definition: config.h:19
@ VOBJ
Definition: univalue.h:31
void pushKV(std::string key, UniValue val)
Definition: univalue.cpp:115
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
Definition: util.cpp:150
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
Definition: util.cpp:167