mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Make signrawtransaction accept P2SH-P2WSH redeemscripts
Github-Pull: #12427
Rebased-From: 5f605e172b
Tree-SHA512: caf8c4e1806757d705493de30eea4f6a146a334ca6f6c93bc74cda43abda391b8406dd8ed6765fcde8eb86b3fb55689547ab69a30f34fca0d7896ea8c4e1db67
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
ad10b90e50
commit
3762ac127a
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user