aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2023-10-11 14:53:04 +0100
committerdergoegge <n.goeggi@gmail.com>2023-11-21 13:15:44 +0000
commit9e58c5bcd96e7ff2062274868814ccae0626589e (patch)
treeb5aa7606931ec3cac2a5e3ce40421562c8fa48f8 /src/rest.cpp
parentd752349029ec7a76f1fd440db2ec2e458d0f3c99 (diff)
downloadbitcoin-9e58c5bcd96e7ff2062274868814ccae0626589e.tar.xz
Use Txid in COutpoint
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 3894b5141d..bb54e780b2 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -789,7 +789,6 @@ static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::
for (size_t i = (fCheckMemPool) ? 1 : 0; i < uriParts.size(); i++)
{
- uint256 txid;
int32_t nOutput;
std::string strTxid = uriParts[i].substr(0, uriParts[i].find('-'));
std::string strOutput = uriParts[i].substr(uriParts[i].find('-')+1);
@@ -797,8 +796,7 @@ static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std::
if (!ParseInt32(strOutput, &nOutput) || !IsHex(strTxid))
return RESTERR(req, HTTP_BAD_REQUEST, "Parse error");
- txid.SetHex(strTxid);
- vOutPoints.emplace_back(txid, (uint32_t)nOutput);
+ vOutPoints.emplace_back(TxidFromString(strTxid), (uint32_t)nOutput);
}
if (vOutPoints.size() > 0)