Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 2,493 Lines • ▼ Show 20 Lines | if (request.params[0].get_str() == "status") { | ||||
if (desc_uni.isNull()) { | if (desc_uni.isNull()) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_INVALID_PARAMETER, | RPC_INVALID_PARAMETER, | ||||
"Descriptor needs to be provided in scan object"); | "Descriptor needs to be provided in scan object"); | ||||
} | } | ||||
desc_str = desc_uni.get_str(); | desc_str = desc_uni.get_str(); | ||||
UniValue range_uni = find_value(scanobject, "range"); | UniValue range_uni = find_value(scanobject, "range"); | ||||
if (!range_uni.isNull()) { | if (!range_uni.isNull()) { | ||||
range = ParseRange(range_uni); | range = ParseDescriptorRange(range_uni); | ||||
if (range.first < 0 || (range.second >> 31) != 0 || | |||||
range.second >= range.first + 1000000) { | |||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | |||||
"range out of range"); | |||||
} | |||||
} | } | ||||
} else { | } else { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_INVALID_PARAMETER, | RPC_INVALID_PARAMETER, | ||||
"Scan object needs to be either a string or an object"); | "Scan object needs to be either a string or an object"); | ||||
} | } | ||||
FlatSigningProvider provider; | FlatSigningProvider provider; | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |