rest: reformat `uri_prefixes` initializer list
What changed, and why it matters
This commit is purely cosmetic: it removes two extra spaces of indentation from a list of web API route definitions in Bitcoin Core's REST interface. No code behavior, route order, or functionality changes.
No action needed; this is a style-only cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change reformats the uri_prefixes[] initializer list in src/rest.cpp from 6-space indentation to 4-space indentation, matching the project’s clang-format style. The entries, their order, and the function pointers they map to are identical before and after. There is no functional diff.
Changed components
src/rest.cppInspect captured patch +14 / −14
diff --git a/src/rest.cpp b/src/rest.cpp
index 06da3906..b91b229a 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -1142,20 +1142,20 @@ static const struct {
const char* prefix;
bool (*handler)(const std::any& context, HTTPRequest* req, const std::string& strReq);
} uri_prefixes[] = {
- {"/rest/tx/", rest_tx},
- {"/rest/block/notxdetails/", rest_block_notxdetails},
- {"/rest/block/", rest_block_extended},
- {"/rest/blockpart/", rest_block_part},
- {"/rest/blockfilter/", rest_block_filter},
- {"/rest/blockfilterheaders/", rest_filter_header},
- {"/rest/chaininfo", rest_chaininfo},
- {"/rest/mempool/", rest_mempool},
- {"/rest/headers/", rest_headers},
- {"/rest/getutxos", rest_getutxos},
- {"/rest/deploymentinfo/", rest_deploymentinfo},
- {"/rest/deploymentinfo", rest_deploymentinfo},
- {"/rest/blockhashbyheight/", rest_blockhash_by_height},
- {"/rest/spenttxouts/", rest_spent_txouts},
+ {"/rest/tx/", rest_tx},
+ {"/rest/block/notxdetails/", rest_block_notxdetails},
+ {"/rest/block/", rest_block_extended},
+ {"/rest/blockpart/", rest_block_part},
+ {"/rest/blockfilter/", rest_block_filter},
+ {"/rest/blockfilterheaders/", rest_filter_header},
+ {"/rest/chaininfo", rest_chaininfo},
+ {"/rest/mempool/", rest_mempool},
+ {"/rest/headers/", rest_headers},
+ {"/rest/getutxos", rest_getutxos},
+ {"/rest/deploymentinfo/", rest_deploymentinfo},
+ {"/rest/deploymentinfo", rest_deploymentinfo},
+ {"/rest/blockhashbyheight/", rest_blockhash_by_height},
+ {"/rest/spenttxouts/", rest_spent_txouts},
};
void StartREST(const std::any& context)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.