Skip to content

Commit 9501738

Browse files
committed
Merge bitcoin/bitcoin#32825: rest: rename strURIPart to uri_part
856f423 scripted-diff: rest: rename `strURIPart` -> `uri_part` (Roman Zeyde) Pull request description: Following bitcoin/bitcoin#32540 (comment). ACKs for top commit: l0rinc: reACK 856f423 maflcko: lgtm ACK 856f423 Tree-SHA512: a56a66872e632eed65fe1f75b9873dcf1d713cf09eba6e1e4031c58d88a5427a5bb7e49be4951ba22dfe4c9b558bb86f0f071fa42fc9cb50689564fe0b3b0297
2 parents b3bb403 + 856f423 commit 9501738

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/rest.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ static bool CheckWarmup(HTTPRequest* req)
187187

188188
static bool rest_headers(const std::any& context,
189189
HTTPRequest* req,
190-
const std::string& strURIPart)
190+
const std::string& uri_part)
191191
{
192192
if (!CheckWarmup(req))
193193
return false;
194194
std::string param;
195-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
195+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
196196
std::vector<std::string> path = SplitString(param, '/');
197197

198198
std::string raw_count;
@@ -319,13 +319,13 @@ static void BlockUndoToJSON(const CBlockUndo& block_undo, UniValue& result)
319319
}
320320
}
321321

322-
static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
322+
static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const std::string& uri_part)
323323
{
324324
if (!CheckWarmup(req)) {
325325
return false;
326326
}
327327
std::string param;
328-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
328+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
329329
std::vector<std::string> path = SplitString(param, '/');
330330

331331
std::string hashStr;
@@ -391,13 +391,13 @@ static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const s
391391

392392
static bool rest_block(const std::any& context,
393393
HTTPRequest* req,
394-
const std::string& strURIPart,
394+
const std::string& uri_part,
395395
TxVerbosity tx_verbosity)
396396
{
397397
if (!CheckWarmup(req))
398398
return false;
399399
std::string hashStr;
400-
const RESTResponseFormat rf = ParseDataFormat(hashStr, strURIPart);
400+
const RESTResponseFormat rf = ParseDataFormat(hashStr, uri_part);
401401

402402
auto hash{uint256::FromHex(hashStr)};
403403
if (!hash) {
@@ -462,22 +462,22 @@ static bool rest_block(const std::any& context,
462462
}
463463
}
464464

465-
static bool rest_block_extended(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
465+
static bool rest_block_extended(const std::any& context, HTTPRequest* req, const std::string& uri_part)
466466
{
467-
return rest_block(context, req, strURIPart, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
467+
return rest_block(context, req, uri_part, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
468468
}
469469

470-
static bool rest_block_notxdetails(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
470+
static bool rest_block_notxdetails(const std::any& context, HTTPRequest* req, const std::string& uri_part)
471471
{
472-
return rest_block(context, req, strURIPart, TxVerbosity::SHOW_TXID);
472+
return rest_block(context, req, uri_part, TxVerbosity::SHOW_TXID);
473473
}
474474

475-
static bool rest_filter_header(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
475+
static bool rest_filter_header(const std::any& context, HTTPRequest* req, const std::string& uri_part)
476476
{
477477
if (!CheckWarmup(req)) return false;
478478

479479
std::string param;
480-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
480+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
481481

482482
std::vector<std::string> uri_parts = SplitString(param, '/');
483483
std::string raw_count;
@@ -594,12 +594,12 @@ static bool rest_filter_header(const std::any& context, HTTPRequest* req, const
594594
}
595595
}
596596

597-
static bool rest_block_filter(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
597+
static bool rest_block_filter(const std::any& context, HTTPRequest* req, const std::string& uri_part)
598598
{
599599
if (!CheckWarmup(req)) return false;
600600

601601
std::string param;
602-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
602+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
603603

604604
// request is sent over URI scheme /rest/blockfilter/filtertype/blockhash
605605
std::vector<std::string> uri_parts = SplitString(param, '/');
@@ -688,12 +688,12 @@ static bool rest_block_filter(const std::any& context, HTTPRequest* req, const s
688688
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
689689
RPCHelpMan getblockchaininfo();
690690

691-
static bool rest_chaininfo(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
691+
static bool rest_chaininfo(const std::any& context, HTTPRequest* req, const std::string& uri_part)
692692
{
693693
if (!CheckWarmup(req))
694694
return false;
695695
std::string param;
696-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
696+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
697697

698698
switch (rf) {
699699
case RESTResponseFormat::JSON: {
@@ -810,12 +810,12 @@ static bool rest_mempool(const std::any& context, HTTPRequest* req, const std::s
810810
}
811811
}
812812

813-
static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
813+
static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string& uri_part)
814814
{
815815
if (!CheckWarmup(req))
816816
return false;
817817
std::string hashStr;
818-
const RESTResponseFormat rf = ParseDataFormat(hashStr, strURIPart);
818+
const RESTResponseFormat rf = ParseDataFormat(hashStr, uri_part);
819819

820820
auto hash{uint256::FromHex(hashStr)};
821821
if (!hash) {
@@ -869,12 +869,12 @@ static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string
869869
}
870870
}
871871

872-
static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
872+
static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::string& uri_part)
873873
{
874874
if (!CheckWarmup(req))
875875
return false;
876876
std::string param;
877-
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
877+
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
878878

879879
std::vector<std::string> uriParts;
880880
if (param.length() > 1)

0 commit comments

Comments
 (0)