Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 668 Lines • ▼ Show 20 Lines | static UniValue decodescript(const Config &config, | ||||
ScriptPubKeyToUniv(script, r, false); | ScriptPubKeyToUniv(script, r, false); | ||||
UniValue type; | UniValue type; | ||||
type = find_value(r, "type"); | type = find_value(r, "type"); | ||||
if (type.isStr() && type.get_str() != "scripthash") { | if (type.isStr() && type.get_str() != "scripthash") { | ||||
// P2SH cannot be wrapped in a P2SH. If this script is already a P2SH, | // P2SH cannot be wrapped in a P2SH. If this script is already a P2SH, | ||||
// don't return the address for a P2SH of the P2SH. | // don't return the address for a P2SH of the P2SH. | ||||
r.pushKV("p2sh", EncodeDestination(CScriptID(script), config)); | r.pushKV("p2sh", EncodeDestination(ScriptHash(script), config)); | ||||
} | } | ||||
return r; | return r; | ||||
} | } | ||||
static UniValue combinerawtransaction(const Config &config, | static UniValue combinerawtransaction(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
if (request.fHelp || request.params.size() != 1) { | if (request.fHelp || request.params.size() != 1) { | ||||
▲ Show 20 Lines • Show All 1,313 Lines • Show Last 20 Lines |