| 144 | return ParseHashV(find_value(o, strKey), strKey); |
| 145 | } |
| 146 | vector<unsigned char> ParseHexV(const UniValue& v, string strName) |
| 147 | { |
| 148 | string strHex; |
| 149 | if (v.isStr()) |
| 150 | strHex = v.get_str(); |
| 151 | if (!IsHex(strHex)) |
| 152 | throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); |
| 153 | return ParseHex(strHex); |
| 154 | } |
| 155 | vector<unsigned char> ParseHexO(const UniValue& o, string strKey) |
| 156 | { |
| 157 | return ParseHexV(find_value(o, strKey), strKey); |
no test coverage detected