refactor: Replace ParseHashStr with FromHex

No need to have two functions with different names that achieve the
exact same thing.
This commit is contained in:
MarcoFalke
2024-07-18 22:54:38 +02:00
parent fa90777245
commit fa7b57e5f5
7 changed files with 34 additions and 55 deletions

View File

@@ -234,15 +234,6 @@ bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
return true;
}
bool ParseHashStr(const std::string& strHex, uint256& result)
{
if ((strHex.size() != 64) || !IsHex(strHex))
return false;
result.SetHexDeprecated(strHex);
return true;
}
util::Result<int> SighashFromStr(const std::string& sighash)
{
static const std::map<std::string, int> map_sighash_values = {