Indentation, could clang-format listindices()
if you retouch – see details for an idea.
0 static RPCHelpMan listindices()
1 {
2- return RPCHelpMan{"listindices",
3- "\nReturns the available indices and their status.\n",
4- {},
5- RPCResult{
6- RPCResult::Type::OBJ, "", "", {
7- {
8- RPCResult::Type::OBJ, "name", "The name of the index",
9- {
10- {RPCResult::Type::BOOL, "synced", "Whether the index is synced or not"},
11- {RPCResult::Type::NUM, "best_block_height", "The block height to which the index is synced"},
12- }
13- },
14- },
15- },
16- RPCExamples{
17- HelpExampleCli("listindices", "")
18- },
19- [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
20-{
21- UniValue results(UniValue::VOBJ);
22+ return RPCHelpMan{
23+ "listindices",
24+ "\nReturns the available indices and their status.\n",
25+ {},
26+ RPCResult{
27+ RPCResult::Type::OBJ,
28+ "",
29+ "",
30+ {
31+ {RPCResult::Type::OBJ, "name", "The name of the index", {
32.../...
33+ },
34+ },
35+ RPCExamples{HelpExampleCli("listindices", "")},
36+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
37+ UniValue results(UniValue::VOBJ);
38
39- if (g_txindex) {
40- results.pushKVs(SummaryToJSON(g_txindex->GetSummary()));
41- }
42+ if (g_txindex) {
43+ results.pushKVs(SummaryToJSON(g_txindex->GetSummary()));
44+ }
45
46- ForEachBlockFilterIndex([&results](BlockFilterIndex& index) {
47- results.pushKVs(SummaryToJSON(index.GetSummary()));
48- });
49+ ForEachBlockFilterIndex([&results](BlockFilterIndex& index) {
50+ results.pushKVs(SummaryToJSON(index.GetSummary()));
51+ });
52
53- return results;
54-},
55+ return results;
56+ },
57 };
58 }