| 116 | return ParseHashV(find_value(o, strKey), strKey); |
| 117 | } |
| 118 | std::vector<unsigned char> ParseHexV(const UniValue& v, std::string strName) |
| 119 | { |
| 120 | std::string strHex; |
| 121 | if (v.isStr()) |
| 122 | strHex = v.get_str(); |
| 123 | if (!IsHex(strHex)) |
| 124 | throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); |
| 125 | return ParseHex(strHex); |
| 126 | } |
| 127 | std::vector<unsigned char> ParseHexO(const UniValue& o, std::string strKey) |
| 128 | { |
| 129 | return ParseHexV(find_value(o, strKey), strKey); |