aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorNiklas Gögge <n.goeggi@gmail.com>2021-12-22 20:46:47 +0100
committerNiklas Gögge <n.goeggi@gmail.com>2021-12-22 20:46:47 +0100
commit83b8f3a8961baa34a136ecfaf62c3ea0d133b6d6 (patch)
tree120910963ecae6e17108d8a9b03f023ed986e316 /src/rest.cpp
parent887796a5ffcbafcd281b920f8d55fcb6e8347584 (diff)
downloadbitcoin-83b8f3a8961baa34a136ecfaf62c3ea0d133b6d6.tar.xz
[refactor] various style fix-ups
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 58b0de539a..65033c6c96 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -341,11 +341,10 @@ static bool rest_block_notxdetails(const std::any& context, HTTPRequest* req, co
return rest_block(context, req, strURIPart, TxVerbosity::SHOW_TXID);
}
-
static bool rest_filter_header(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
{
- if (!CheckWarmup(req))
- return false;
+ if (!CheckWarmup(req)) return false;
+
std::string param;
const RetFormat rf = ParseDataFormat(param, strURIPart);
@@ -375,7 +374,7 @@ static bool rest_filter_header(const std::any& context, HTTPRequest* req, const
return RESTERR(req, HTTP_BAD_REQUEST, strprintf("Header count out of acceptable range (1-%u): %s", MAX_REST_HEADERS_RESULTS, uri_parts[1]));
}
- std::vector<const CBlockIndex *> headers;
+ std::vector<const CBlockIndex*> headers;
headers.reserve(*parsed_count);
{
ChainstateManager* maybe_chainman = GetChainman(context, req);
@@ -396,7 +395,7 @@ static bool rest_filter_header(const std::any& context, HTTPRequest* req, const
std::vector<uint256> filter_headers;
filter_headers.reserve(*parsed_count);
- for (const CBlockIndex *pindex : headers) {
+ for (const CBlockIndex* pindex : headers) {
uint256 filter_header;
if (!index->LookupFilterHeader(pindex, filter_header)) {
std::string errmsg = "Filter not found.";
@@ -454,12 +453,12 @@ static bool rest_filter_header(const std::any& context, HTTPRequest* req, const
static bool rest_block_filter(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
{
- if (!CheckWarmup(req))
- return false;
+ if (!CheckWarmup(req)) return false;
+
std::string param;
const RetFormat rf = ParseDataFormat(param, strURIPart);
- //request is sent over URI scheme /rest/blockfilter/filtertype/blockhash
+ // request is sent over URI scheme /rest/blockfilter/filtertype/blockhash
std::vector<std::string> uri_parts;
boost::split(uri_parts, param, boost::is_any_of("/"));
if (uri_parts.size() != 2) {