Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 912 Lines • ▼ Show 20 Lines | if (!prevTxsUnival.isNull()) { | ||||
} | } | ||||
// If redeemScript given and not using the local wallet (private | // If redeemScript given and not using the local wallet (private | ||||
// keys given), add redeemScript to the keystore so it can be | // keys given), add redeemScript to the keystore so it can be | ||||
// signed: | // signed: | ||||
if (is_temp_keystore && scriptPubKey.IsPayToScriptHash()) { | if (is_temp_keystore && scriptPubKey.IsPayToScriptHash()) { | ||||
RPCTypeCheckObj( | RPCTypeCheckObj( | ||||
prevOut, { | prevOut, { | ||||
{"txid", UniValueType(UniValue::VSTR)}, | |||||
{"vout", UniValueType(UniValue::VNUM)}, | |||||
{"scriptPubKey", UniValueType(UniValue::VSTR)}, | |||||
{"redeemScript", UniValueType(UniValue::VSTR)}, | {"redeemScript", UniValueType(UniValue::VSTR)}, | ||||
}); | }); | ||||
UniValue v = find_value(prevOut, "redeemScript"); | UniValue v = find_value(prevOut, "redeemScript"); | ||||
if (!v.isNull()) { | if (!v.isNull()) { | ||||
std::vector<uint8_t> rsData(ParseHexV(v, "redeemScript")); | std::vector<uint8_t> rsData(ParseHexV(v, "redeemScript")); | ||||
CScript redeemScript(rsData.begin(), rsData.end()); | CScript redeemScript(rsData.begin(), rsData.end()); | ||||
keystore->AddCScript(redeemScript); | keystore->AddCScript(redeemScript); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 563 Lines • Show Last 20 Lines |