diff options
| author | MarcoFalke <[email protected]> | 2019-04-26 09:04:08 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-06-18 09:34:10 -0400 |
| commit | 0023c978905b462e614872a7674d4225e1cf7007 (patch) | |
| tree | d1f0a93fce62367539440608f49ec87630fedb7b /test/functional | |
| parent | Bugfix: test/functional/rpc_psbt: Correct test description comment (diff) | |
| download | discoin-0023c978905b462e614872a7674d4225e1cf7007.tar.xz discoin-0023c978905b462e614872a7674d4225e1cf7007.zip | |
rpc: bugfix: Properly use iswitness in converttopsbt
Also explain the param in all RPCs
Github-Pull: #15899
Rebased-From: fa499b5f027f77c0bf13699852c8c06f78e27bef
Diffstat (limited to 'test/functional')
| -rwxr-xr-x | test/functional/rpc_psbt.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 84acd9c82..6c0aec922 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -146,9 +146,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) |