mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Drop ParseHashUV in favor of calling ParseHashStr
The one existing call already validates get_str will pass via checkObject.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user