Skip to content

Commit dfdf7f2

Browse files
committed
scripted-diff: Fix indentation in RPCHelpMan usages
-BEGIN VERIFY SCRIPT- git diff -U0 HEAD~3.. | ./contrib/devtools/clang-format-diff.py -p0 -i -v -END VERIFY SCRIPT-
1 parent 31599d8 commit dfdf7f2

File tree

10 files changed

+2820
-2843
lines changed

10 files changed

+2820
-2843
lines changed

src/rpc/blockchain.cpp

Lines changed: 484 additions & 510 deletions
Large diffs are not rendered by default.

src/rpc/mining.cpp

Lines changed: 202 additions & 199 deletions
Large diffs are not rendered by default.

src/rpc/misc.cpp

Lines changed: 158 additions & 171 deletions
Large diffs are not rendered by default.

src/rpc/net.cpp

Lines changed: 138 additions & 141 deletions
Large diffs are not rendered by default.

src/rpc/rawtransaction.cpp

Lines changed: 591 additions & 552 deletions
Large diffs are not rendered by default.

src/rpc/server.cpp

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -177,27 +177,27 @@ UniValue stop(const JSONRPCRequest& jsonRequest)
177177

178178
static UniValue uptime(const JSONRPCRequest& jsonRequest)
179179
{
180-
RPCHelpMan{"uptime",
181-
"\nReturns the total uptime of the server.\n",
182-
{},
183-
RPCResult{
184-
"ttt (numeric) The number of seconds that the server has been running\n"
185-
},
186-
RPCExamples{
187-
HelpExampleCli("uptime", "")
188-
+ HelpExampleRpc("uptime", "")
189-
},
190-
}.Check(jsonRequest);
180+
RPCHelpMan{
181+
"uptime",
182+
"\nReturns the total uptime of the server.\n",
183+
{},
184+
RPCResult{
185+
"ttt (numeric) The number of seconds that the server has been running\n"},
186+
RPCExamples{
187+
HelpExampleCli("uptime", "") + HelpExampleRpc("uptime", "")},
188+
}
189+
.Check(jsonRequest);
191190

192191
return GetTime() - GetStartupTime();
193192
}
194193

195194
static UniValue getrpcinfo(const JSONRPCRequest& request)
196195
{
197-
RPCHelpMan{"getrpcinfo",
198-
"\nReturns details of the RPC server.\n",
199-
{},
200-
RPCResult{
196+
RPCHelpMan{
197+
"getrpcinfo",
198+
"\nReturns details of the RPC server.\n",
199+
{},
200+
RPCResult{
201201
"{\n"
202202
" \"active_commands\" (array) All active commands\n"
203203
" [\n"
@@ -206,12 +206,11 @@ static UniValue getrpcinfo(const JSONRPCRequest& request)
206206
" \"duration\" (numeric) The running time in microseconds\n"
207207
" },...\n"
208208
" ]\n"
209-
"}\n"
210-
},
211-
RPCExamples{
212-
HelpExampleCli("getrpcinfo", "")
213-
+ HelpExampleRpc("getrpcinfo", "")},
214-
}.Check(request);
209+
"}\n"},
210+
RPCExamples{
211+
HelpExampleCli("getrpcinfo", "") + HelpExampleRpc("getrpcinfo", "")},
212+
}
213+
.Check(request);
215214

216215
LOCK(g_rpc_server_info.mutex);
217216
UniValue active_commands(UniValue::VARR);

src/rpc/server.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class JSONRPCRequest
4444
void parse(const UniValue& valRequest);
4545
};
4646

47-
inline void RPCHelpMan::Check(const JSONRPCRequest& request) const {
47+
inline void RPCHelpMan::Check(const JSONRPCRequest& request) const
48+
{
4849
if (request.fHelp || !IsValidNumArgs(request.params.size())) throw std::runtime_error(ToString());
4950
}
5051

src/wallet/rpcdump.cpp

Lines changed: 194 additions & 207 deletions
Large diffs are not rendered by default.

src/wallet/rpcwallet.cpp

Lines changed: 1021 additions & 1030 deletions
Large diffs are not rendered by default.

src/zmq/zmqrpc.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,23 @@ namespace {
1515

1616
UniValue getzmqnotifications(const JSONRPCRequest& request)
1717
{
18-
RPCHelpMan{"getzmqnotifications",
19-
"\nReturns information about the active ZeroMQ notifications.\n",
20-
{},
21-
RPCResult{
18+
RPCHelpMan{
19+
"getzmqnotifications",
20+
"\nReturns information about the active ZeroMQ notifications.\n",
21+
{},
22+
RPCResult{
2223
"[\n"
2324
" { (json object)\n"
2425
" \"type\": \"pubhashtx\", (string) Type of notification\n"
2526
" \"address\": \"...\", (string) Address of the publisher\n"
2627
" \"hwm\": n (numeric) Outbound message high water mark\n"
2728
" },\n"
2829
" ...\n"
29-
"]\n"
30-
},
31-
RPCExamples{
32-
HelpExampleCli("getzmqnotifications", "")
33-
+ HelpExampleRpc("getzmqnotifications", "")
34-
},
35-
}.Check(request);
30+
"]\n"},
31+
RPCExamples{
32+
HelpExampleCli("getzmqnotifications", "") + HelpExampleRpc("getzmqnotifications", "")},
33+
}
34+
.Check(request);
3635

3736
UniValue result(UniValue::VARR);
3837
if (g_zmq_notification_interface != nullptr) {

0 commit comments

Comments
 (0)