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

Function ParseHashV

src/rpcserver.cpp:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

ParseHashOFunction · 0.85
getrawtransactionFunction · 0.85

Calls 5

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

Tested by

no test coverage detected