Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/util.cpp
Show First 20 Lines • Show All 750 Lines • ▼ Show 20 Lines | if (scanobject.isStr()) { | ||||
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"); | ||||
} | } | ||||
std::string error; | std::string error; | ||||
auto desc = Parse(desc_str, provider, error); | auto desc = Parse(desc_str, provider, error); | ||||
if (!desc) { | if (!desc) { | ||||
throw JSONRPCError( | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error); | ||||
RPC_INVALID_ADDRESS_OR_KEY, | |||||
strprintf("Invalid descriptor '%s', %s", desc_str, error)); | |||||
} | } | ||||
if (!desc->IsRange()) { | if (!desc->IsRange()) { | ||||
range.first = 0; | range.first = 0; | ||||
range.second = 0; | range.second = 0; | ||||
} | } | ||||
std::vector<CScript> ret; | std::vector<CScript> ret; | ||||
for (int i = range.first; i <= range.second; ++i) { | for (int i = range.first; i <= range.second; ++i) { | ||||
std::vector<CScript> scripts; | std::vector<CScript> scripts; | ||||
Show All 10 Lines |