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