| 128 | return ParseHashV(o.find_value(strKey), strKey); |
| 129 | } |
| 130 | std::vector<unsigned char> ParseHexV(const UniValue& v, std::string_view name) |
| 131 | { |
| 132 | std::string strHex; |
| 133 | if (v.isStr()) |
| 134 | strHex = v.get_str(); |
| 135 | if (!IsHex(strHex)) |
| 136 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be hexadecimal string (not '%s')", name, strHex)); |
| 137 | return ParseHex(strHex); |
| 138 | } |
| 139 | std::vector<unsigned char> ParseHexO(const UniValue& o, std::string_view strKey) |
| 140 | { |
| 141 | return ParseHexV(o.find_value(strKey), strKey); |
no test coverage detected