Indentation, could clang-format listindices() if you retouch -- see details for an idea.
<details><summary><code>clang-format -i src/rpc/misc.cpp</code></summary><p>
static RPCHelpMan listindices()
{
- return RPCHelpMan{"listindices",
- "\nReturns the available indices and their status.\n",
- {},
- RPCResult{
- RPCResult::Type::OBJ, "", "", {
- {
- RPCResult::Type::OBJ, "name", "The name of the index",
- {
- {RPCResult::Type::BOOL, "synced", "Whether the index is synced or not"},
- {RPCResult::Type::NUM, "best_block_height", "The block height to which the index is synced"},
- }
- },
- },
- },
- RPCExamples{
- HelpExampleCli("listindices", "")
- },
- [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
-{
- UniValue results(UniValue::VOBJ);
+ return RPCHelpMan{
+ "listindices",
+ "\nReturns the available indices and their status.\n",
+ {},
+ RPCResult{
+ RPCResult::Type::OBJ,
+ "",
+ "",
+ {
+ {RPCResult::Type::OBJ, "name", "The name of the index", {
.../...
+ },
+ },
+ RPCExamples{HelpExampleCli("listindices", "")},
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
+ UniValue results(UniValue::VOBJ);
- if (g_txindex) {
- results.pushKVs(SummaryToJSON(g_txindex->GetSummary()));
- }
+ if (g_txindex) {
+ results.pushKVs(SummaryToJSON(g_txindex->GetSummary()));
+ }
- ForEachBlockFilterIndex([&results](BlockFilterIndex& index) {
- results.pushKVs(SummaryToJSON(index.GetSummary()));
- });
+ ForEachBlockFilterIndex([&results](BlockFilterIndex& index) {
+ results.pushKVs(SummaryToJSON(index.GetSummary()));
+ });
- return results;
-},
+ return results;
+ },
};
}
</p></details>