aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2018-02-13 13:04:48 -0800
committerPieter Wuille <[email protected]>2018-02-13 17:37:47 -0800
commit5f605e172baee35421eb20736601befdd8cad796 (patch)
tree3991b450a2bb676a26c51ac025cf56c176ce784f /src
parentMerge #12424: Fix rescan test failure due to unset g_address_type, g_change_type (diff)
downloaddiscoin-5f605e172baee35421eb20736601befdd8cad796.tar.xz
discoin-5f605e172baee35421eb20736601befdd8cad796.zip
Make signrawtransaction accept P2SH-P2WSH redeemscripts
Diffstat (limited to 'src')
-rw-r--r--src/rpc/rawtransaction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 24f2431ef..bbc0459a7 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));
}
}
}