Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
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
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
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