|
|
@ -395,10 +395,8 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) |
|
|
|
|
|
|
|
|
|
|
|
if (!registers.count("privatekeys")) |
|
|
|
if (!registers.count("privatekeys")) |
|
|
|
throw runtime_error("privatekeys register variable must be set."); |
|
|
|
throw runtime_error("privatekeys register variable must be set."); |
|
|
|
bool fGivenKeys = false; |
|
|
|
|
|
|
|
CBasicKeyStore tempKeystore; |
|
|
|
CBasicKeyStore tempKeystore; |
|
|
|
UniValue keysObj = registers["privatekeys"]; |
|
|
|
UniValue keysObj = registers["privatekeys"]; |
|
|
|
fGivenKeys = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) { |
|
|
|
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) { |
|
|
|
if (!keysObj[kidx].isStr()) |
|
|
|
if (!keysObj[kidx].isStr()) |
|
|
@ -454,7 +452,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) |
|
|
|
|
|
|
|
|
|
|
|
// if redeemScript given and private keys given,
|
|
|
|
// if redeemScript given and private keys given,
|
|
|
|
// add redeemScript to the tempKeystore so it can be signed:
|
|
|
|
// add redeemScript to the tempKeystore so it can be signed:
|
|
|
|
if (fGivenKeys && (scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) && |
|
|
|
if ((scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) && |
|
|
|
prevOut.exists("redeemScript")) { |
|
|
|
prevOut.exists("redeemScript")) { |
|
|
|
UniValue v = prevOut["redeemScript"]; |
|
|
|
UniValue v = prevOut["redeemScript"]; |
|
|
|
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript")); |
|
|
|
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript")); |
|
|
|