Merge #14481: Add P2SH-P2WSH support to listunspent RPC

6ca836ab3a Add release note for listunspent P2WSH change (MeshCollider)
928beae007 Add test for P2SH-P2WSH in signrawtransactionwithkey and listunspent (MeshCollider)
314784a60f Make listunspent and signrawtransaction RPCs support witnessScript (MeshCollider)

Pull request description:

  This is a reworked version of #11708 after #12427 and the `signrawtransaction` split.

  For a P2WSH address, listunspent should return the witness script, and for a P2SH-P2WSH address, it should also return the inner witness script (because SignTransaction will automatically wrap it in P2SH if required).

  Includes a test which also tests the behaviour of #12427, and release note.

Tree-SHA512: a8e72cf16930312bf48ec47e44a68f8d7e26664043c1b4cc0983eb25aec4087e511188ff9a0f181cd7b8a0c068c60d7f1e7e3f226b79e8c48890039dcf57f7b7
This commit is contained in:
Wladimir J. van der Laan
2019-02-14 22:16:48 +01:00
4 changed files with 81 additions and 10 deletions

View File

@@ -0,0 +1,9 @@
Low-level RPC changes
----------------------
The `listunspent` RPC has been modified so that it also returns `witnessScript`,
the witness script in the case of a P2WSH or P2SH-P2WSH output.
The `signrawtransactionwithkey` and `signrawtransactionwithwallet` RPCs have been
modified so that they also optionally accept a `witnessScript`, the witness script in the
case of a P2WSH or P2SH-P2WSH output. This is compatible with the change to `listunspent`.