Merge bitcoin/bitcoin#32825: rest: rename `strURIPart` to `uri_part`

856f4235b1 scripted-diff: rest: rename `strURIPart` -> `uri_part` (Roman Zeyde)

Pull request description:

  Following https://github.com/bitcoin/bitcoin/pull/32540#discussion_r2172902737.

ACKs for top commit:
  l0rinc:
    reACK 856f4235b1
  maflcko:
    lgtm ACK 856f4235b1

Tree-SHA512: a56a66872e632eed65fe1f75b9873dcf1d713cf09eba6e1e4031c58d88a5427a5bb7e49be4951ba22dfe4c9b558bb86f0f071fa42fc9cb50689564fe0b3b0297
This commit is contained in:
merge-script 2025-06-30 13:20:52 +01:00
commit 9501738e1c
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 20 additions and 20 deletions

View File

@ -187,12 +187,12 @@ static bool CheckWarmup(HTTPRequest* req)
static bool rest_headers(const std::any& context,
HTTPRequest* req,
const std::string& strURIPart)
const std::string& uri_part)
{
if (!CheckWarmup(req))
return false;
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
std::vector<std::string> path = SplitString(param, '/');
std::string raw_count;
@ -319,13 +319,13 @@ static void BlockUndoToJSON(const CBlockUndo& block_undo, UniValue& result)
}
}
static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req)) {
return false;
}
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
std::vector<std::string> path = SplitString(param, '/');
std::string hashStr;
@ -391,13 +391,13 @@ static bool rest_spent_txouts(const std::any& context, HTTPRequest* req, const s
static bool rest_block(const std::any& context,
HTTPRequest* req,
const std::string& strURIPart,
const std::string& uri_part,
TxVerbosity tx_verbosity)
{
if (!CheckWarmup(req))
return false;
std::string hashStr;
const RESTResponseFormat rf = ParseDataFormat(hashStr, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(hashStr, uri_part);
auto hash{uint256::FromHex(hashStr)};
if (!hash) {
@ -462,22 +462,22 @@ static bool rest_block(const std::any& context,
}
}
static bool rest_block_extended(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_block_extended(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
return rest_block(context, req, strURIPart, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
return rest_block(context, req, uri_part, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
}
static bool rest_block_notxdetails(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_block_notxdetails(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
return rest_block(context, req, strURIPart, TxVerbosity::SHOW_TXID);
return rest_block(context, req, uri_part, TxVerbosity::SHOW_TXID);
}
static bool rest_filter_header(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_filter_header(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req)) return false;
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
std::vector<std::string> uri_parts = SplitString(param, '/');
std::string raw_count;
@ -594,12 +594,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)
static bool rest_block_filter(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req)) return false;
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
// request is sent over URI scheme /rest/blockfilter/filtertype/blockhash
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
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
RPCHelpMan getblockchaininfo();
static bool rest_chaininfo(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_chaininfo(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req))
return false;
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
switch (rf) {
case RESTResponseFormat::JSON: {
@ -810,12 +810,12 @@ static bool rest_mempool(const std::any& context, HTTPRequest* req, const std::s
}
}
static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req))
return false;
std::string hashStr;
const RESTResponseFormat rf = ParseDataFormat(hashStr, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(hashStr, uri_part);
auto hash{uint256::FromHex(hashStr)};
if (!hash) {
@ -869,12 +869,12 @@ static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string
}
}
static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::string& strURIPart)
static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::string& uri_part)
{
if (!CheckWarmup(req))
return false;
std::string param;
const RESTResponseFormat rf = ParseDataFormat(param, strURIPart);
const RESTResponseFormat rf = ParseDataFormat(param, uri_part);
std::vector<std::string> uriParts;
if (param.length() > 1)