diff options
-rw-r--r-- | src/rpc/rawtransaction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 00e73675b4..8dea988d5b 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -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)); } } } |