diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-02-13 13:04:48 -0800 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-15 22:38:14 +0100 |
commit | 3762ac127aec4d843fce8ca8335b3b06746fa0be (patch) | |
tree | 3349b32f531791c7eb0e4790838691e8708740cc | |
parent | ad10b90e502d97993ba6e2b07e3f744129344a28 (diff) |
Make signrawtransaction accept P2SH-P2WSH redeemscripts
Github-Pull: #12427
Rebased-From: 5f605e172baee35421eb20736601befdd8cad796
Tree-SHA512: caf8c4e1806757d705493de30eea4f6a146a334ca6f6c93bc74cda43abda391b8406dd8ed6765fcde8eb86b3fb55689547ab69a30f34fca0d7896ea8c4e1db67
-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)); } } } |