aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-09-24 10:59:17 -0400
committerBen Woosley <ben.woosley@gmail.com>2018-09-25 09:14:52 -0700
commit9c5af58d51cea7d0cf2a598a9979eeba103b23ff (patch)
tree8b75bcda130319567c94b2e37535f81d911b4d2d /src/rest.cpp
parent990fc0de1afdfac8b711f39d9dbbab0c5f88a4c5 (diff)
Consolidate redundant implementations of ParseHashStr
This change: * adds a length check to ParseHashStr, appropriate given its use to populate a 256-bit number from a hex str. * allows the caller to handle the failure, which allows for the more appropriate JSONRPCError on failure in prioritisetransaction rpc
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 7792844992..1850c0b7a6 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -105,15 +105,6 @@ static std::string AvailableDataFormatsString()
return formats;
}
-static bool ParseHashStr(const std::string& strReq, uint256& v)
-{
- if (!IsHex(strReq) || (strReq.size() != 64))
- return false;
-
- v.SetHex(strReq);
- return true;
-}
-
static bool CheckWarmup(HTTPRequest* req)
{
std::string statusmessage;