diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-02-13 13:04:48 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-02-13 17:37:47 -0800 |
commit | 5f605e172baee35421eb20736601befdd8cad796 (patch) | |
tree | 3991b450a2bb676a26c51ac025cf56c176ce784f /src/rpc/rawtransaction.cpp | |
parent | 252ae7111cbff09a4cbc5caee9e02b6ed3580476 (diff) |
Make signrawtransaction accept P2SH-P2WSH redeemscripts
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-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 24f2431efc..bbc0459a7c 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)); } } } |