Make signrawtransaction accept P2SH-P2WSH redeemscripts

This commit is contained in:
Pieter Wuille 2018-02-13 13:04:48 -08:00
parent 252ae7111c
commit 5f605e172b

View file

@ -848,6 +848,8 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
std::vector<unsigned char> rsData(ParseHexV(v, "redeemScript"));
CScript redeemScript(rsData.begin(), rsData.end());
tempKeystore.AddCScript(redeemScript);
// Automatically also add the P2WSH wrapped version of the script (to deal with P2SH-P2WSH).
tempKeystore.AddCScript(GetScriptForWitness(redeemScript));
}
}
}