MCPcopy Create free account
hub / github.com/ElementsProject/elements / ParseDescriptorRange

Function ParseDescriptorRange

src/rpc/util.cpp:1012–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1010}
1011
1012std::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
1028std::vector<CScript> EvalDescriptorStringOrObject(const UniValue& scanobject, FlatSigningProvider& provider)
1029{

Callers 5

ProcessImportDescriptorFunction · 0.85
backup.cppFile · 0.85
FUZZ_TARGET_INITFunction · 0.85
deriveaddressesFunction · 0.85

Calls 2

ParseRangeFunction · 0.85
JSONRPCErrorFunction · 0.85

Tested by 1

FUZZ_TARGET_INITFunction · 0.68