| 181 | } |
| 182 | |
| 183 | uint256 ParseHashStr(const std::string& strHex, const std::string& strName) |
| 184 | { |
| 185 | if (!IsHex(strHex)) // Note: IsHex("") is false |
| 186 | throw std::runtime_error(strName + " must be hexadecimal string (not '" + strHex + "')"); |
| 187 | |
| 188 | uint256 result; |
| 189 | result.SetHex(strHex); |
| 190 | return result; |
| 191 | } |
| 192 | |
| 193 | std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName) |
| 194 | { |