Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 804 Lines • ▼ Show 20 Lines | try { | ||||
? scriptPubKey.get_str() | ? scriptPubKey.get_str() | ||||
: scriptPubKey["address"].get_str(); | : scriptPubKey["address"].get_str(); | ||||
// Parse the output. | // Parse the output. | ||||
CScript script; | CScript script; | ||||
CTxDestination dest; | CTxDestination dest; | ||||
if (!isScript) { | if (!isScript) { | ||||
dest = DecodeDestination(output); | dest = DecodeDestination(output, pwallet->chainParams); | ||||
if (!IsValidDestination(dest)) { | if (!IsValidDestination(dest)) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
"Invalid address"); | "Invalid address"); | ||||
} | } | ||||
script = GetScriptForDestination(dest); | script = GetScriptForDestination(dest); | ||||
} else { | } else { | ||||
if (!IsHex(output)) { | if (!IsHex(output)) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
▲ Show 20 Lines • Show All 512 Lines • Show Last 20 Lines |