Drop ParseHashUV in favor of calling ParseHashStr

The one existing call already validates get_str will
pass via checkObject.
This commit is contained in:
Ben Woosley
2018-06-08 04:12:36 -07:00
parent 56f69360dc
commit abd2678ac1
3 changed files with 1 additions and 10 deletions

View File

@@ -160,14 +160,6 @@ bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
return true;
}
uint256 ParseHashUV(const UniValue& v, const std::string& strName)
{
std::string strHex;
if (v.isStr())
strHex = v.getValStr();
return ParseHashStr(strHex, strName); // Note: ParseHashStr("") throws a runtime_error
}
uint256 ParseHashStr(const std::string& strHex, const std::string& strName)
{
if (!IsHex(strHex)) // Note: IsHex("") is false