Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 696 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))); | r.pushKV("p2sh", EncodeDestination(CScriptID(script), config)); | ||||
} | } | ||||
return r; | return r; | ||||
} | } | ||||
/** | /** | ||||
* Pushes a JSON object for script verification or signing errors to vErrorsRet. | * Pushes a JSON object for script verification or signing errors to vErrorsRet. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 787 Lines • Show Last 20 Lines |