aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-26 09:04:08 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-05-16 15:56:04 -0400
commitfa499b5f027f77c0bf13699852c8c06f78e27bef (patch)
tree0d64e4c73efcbc3879a575c7fa08cf186b179766 /test/functional/rpc_psbt.py
parentfa5c5cd141f0265a5693234690ac757b811157d8 (diff)
downloadbitcoin-fa499b5f027f77c0bf13699852c8c06f78e27bef.tar.xz
rpc: bugfix: Properly use iswitness in converttopsbt
Also explain the param in all RPCs
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 8a7ea7aa58..430be6dd37 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -152,9 +152,10 @@ class PSBTTest(BitcoinTestFramework):
# Make sure that a non-psbt with signatures cannot be converted
# Error could be either "TX decode failed" (segwit inputs causes parsing to fail) or "Inputs must not have scriptSigs and scriptWitnesses"
+ # We must set iswitness=True because the serialized transaction has inputs and is therefore a witness transaction
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])
- assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, signedtx['hex'])
- assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, signedtx['hex'], False)
+ assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, hexstring=signedtx['hex'], iswitness=True)
+ assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, hexstring=signedtx['hex'], permitsigdata=False, iswitness=True)
# Unless we allow it to convert and strip signatures
self.nodes[0].converttopsbt(signedtx['hex'], True)