MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ParseHashStr

Function ParseHashStr

src/core_read.cpp:135–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135uint256 ParseHashStr(const std::string& strHex, const std::string& strName)
136{
137 if (!IsHex(strHex)) // Note: IsHex("") is false
138 throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
139
140 uint256 result;
141 result.SetHex(strHex);
142 return result;
143}
144
145vector<unsigned char> ParseHexUV(const UniValue& v, const string& strName)
146{

Callers 1

ParseHashUVFunction · 0.70

Calls 2

IsHexFunction · 0.85
SetHexMethod · 0.45

Tested by

no test coverage detected