MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ParseDescriptorRange

Function ParseDescriptorRange

src/rpc/util.cpp:1318–1332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1316}
1317
1318std::pair<int64_t, int64_t> ParseDescriptorRange(const UniValue& value)
1319{
1320 int64_t low, high;
1321 std::tie(low, high) = ParseRange(value);
1322 if (low < 0) {
1323 throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should be greater or equal than 0");
1324 }
1325 if ((high >> 31) != 0) {
1326 throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range is too high");
1327 }
1328 if (high >= low + 1000000) {
1329 throw JSONRPCError(RPC_INVALID_PARAMETER, "Range is too large");
1330 }
1331 return {low, high};
1332}
1333
1334std::vector<CScript> EvalDescriptorStringOrObject(const UniValue& scanobject, FlatSigningProvider& provider, const bool expand_priv)
1335{

Callers 4

backup.cppFile · 0.85
parse_univalue.cppFile · 0.85
deriveaddressesFunction · 0.85

Calls 2

ParseRangeFunction · 0.85
JSONRPCErrorFunction · 0.85

Tested by

no test coverage detected