| 1010 | } |
| 1011 | |
| 1012 | std::pair<int64_t, int64_t> ParseDescriptorRange(const UniValue& value) |
| 1013 | { |
| 1014 | int64_t low, high; |
| 1015 | std::tie(low, high) = ParseRange(value); |
| 1016 | if (low < 0) { |
| 1017 | throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should be greater or equal than 0"); |
| 1018 | } |
| 1019 | if ((high >> 31) != 0) { |
| 1020 | throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range is too high"); |
| 1021 | } |
| 1022 | if (high >= low + 1000000) { |
| 1023 | throw JSONRPCError(RPC_INVALID_PARAMETER, "Range is too large"); |
| 1024 | } |
| 1025 | return {low, high}; |
| 1026 | } |
| 1027 | |
| 1028 | std::vector<CScript> EvalDescriptorStringOrObject(const UniValue& scanobject, FlatSigningProvider& provider) |
| 1029 | { |