MCPcopy Create free account
hub / github.com/LUX-Core/lux / ParseHashV

Function ParseHashV

src/rpcserver.cpp:129–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129uint256 ParseHashV(const UniValue& v, string strName)
130{
131 string strHex;
132 if (v.isStr())
133 strHex = v.get_str();
134 if (!IsHex(strHex)) // Note: IsHex("") is false
135 throw JSONRPCError(RPC_INVALID_PARAMETER, strName + " must be hexadecimal string (not '" + strHex + "')");
136 uint256 result = uint256();
137 result.SetHex(strHex);
138 return result;
139}
140uint256 ParseHashO(const UniValue& o, string strKey)
141{
142 return ParseHashV(find_value(o, strKey), strKey);

Callers 4

ParseHashOFunction · 0.85
getspentinfoFunction · 0.85
purgetxindexFunction · 0.85
getrawtransactionFunction · 0.85

Calls 6

IsHexFunction · 0.85
JSONRPCErrorFunction · 0.85
isStrMethod · 0.80
get_strMethod · 0.80
uint256Class · 0.70
SetHexMethod · 0.45

Tested by

no test coverage detected