aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-25 11:24:11 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-25 11:24:14 -0400
commit8cca1fbea9bc7bcd32600f3ba5e81cfefb4309af (patch)
tree7716d9c2c54e009850dd875b6c2230cf073c0801 /test
parent40a720acb8472f6e8afdf8b8d1897f35d58daf1f (diff)
parentc87fc71f7e9316bcc0653cd86c50177424b5b1f9 (diff)
downloadbitcoin-8cca1fbea9bc7bcd32600f3ba5e81cfefb4309af.tar.xz
Merge #14818: Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions
c87fc71f7e Bugfix: test/functional/rpc_psbt: Correct test description comment (Luke Dashjr) 097c4aa379 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions (Luke Dashjr) Pull request description: When converttopsbt is called with a signed transaction, it either fails with "TX decode failed" if one or more inputs were segwit, or "Inputs must not have scriptSigs and scriptWitnesses" otherwise. Since no effort is made by the test to ensure the inputs are segwit or not, avoid checking the exact message used. The error code is still checked to ensure it is of the correct kind of failure. ACKs for commit c87fc7: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/14818/commits/c87fc71f7e9316bcc0653cd86c50177424b5b1f9 achow101: utACK c87fc71f7e9316bcc0653cd86c50177424b5b1f9 Tree-SHA512: 61312b5d49aa50652902f30ba9693dfba9e5b7e6478f23becda20202d8b328ddb3e040f2199b617a68df133a5f1f8b5d68bc19d4621303f17c1963dca01bd9ef
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_psbt.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index fb68f79bbd..8a7ea7aa58 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -150,10 +150,11 @@ class PSBTTest(BitcoinTestFramework):
new_psbt = self.nodes[0].converttopsbt(rawtx['hex'])
self.nodes[0].decodepsbt(new_psbt)
- # Make sure that a psbt with signatures cannot be converted
+ # 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"
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])
- assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].converttopsbt, signedtx['hex'])
- assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].converttopsbt, signedtx['hex'], False)
+ assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, signedtx['hex'])
+ assert_raises_rpc_error(-22, "", self.nodes[0].converttopsbt, signedtx['hex'], False)
# Unless we allow it to convert and strip signatures
self.nodes[0].converttopsbt(signedtx['hex'], True)