aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_segwit.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-11-02 10:35:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-11-02 14:19:44 +0100
commitfae45c34d13330442d5135cb9ac5a56dc697497b (patch)
treec4dd162cb29c1d1782b2e7fa3ec61b328300b07f /test/functional/p2p_segwit.py
parent867dbeba5f91be15ca0d4a7303a71957ff9a37ad (diff)
downloadbitcoin-fae45c34d13330442d5135cb9ac5a56dc697497b.tar.xz
test: Only try witness deserialize when checking for witness deserialize failure
Diffstat (limited to 'test/functional/p2p_segwit.py')
-rwxr-xr-xtest/functional/p2p_segwit.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 5c15538418..e99ecd8026 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -2097,14 +2097,14 @@ class SegWitTest(BitcoinTestFramework):
raw = self.nodes[0].createrawtransaction([{"txid": unspent['txid'], "vout": unspent['vout']}], {self.nodes[0].getnewaddress(): 1})
tx = FromHex(CTransaction(), raw)
- assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex())
+ assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, hexstring=serialize_with_bogus_witness(tx).hex(), iswitness=True)
with self.nodes[0].assert_debug_log(['Superfluous witness record']):
self.test_node.send_and_ping(msg_bogus_tx(tx))
raw = self.nodes[0].signrawtransactionwithwallet(raw)
assert raw['complete']
raw = raw['hex']
tx = FromHex(CTransaction(), raw)
- assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex())
+ assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, hexstring=serialize_with_bogus_witness(tx).hex(), iswitness=True)
with self.nodes[0].assert_debug_log(['Unknown transaction optional data']):
self.test_node.send_and_ping(msg_bogus_tx(tx))