mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
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:
parent
fa90777245
commit
fa7b57e5f5
7 changed files with 34 additions and 55 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue