Witness deserialize will fail always. (This is what the test is checking for)
Consequently, non-witness deserialize is also tried, and it might succeed accidentally. Avoid that by not trying non-witness deserialize.
Fixes #20249
Witness deserialize will fail always. (This is what the test is checking for)
Consequently, non-witness deserialize is also tried, and it might succeed accidentally. Avoid that by not trying non-witness deserialize.
Fixes #20249
2096 | @@ -2097,14 +2097,14 @@ def serialize(self): 2097 | 2098 | raw = self.nodes[0].createrawtransaction([{"txid": unspent['txid'], "vout": unspent['vout']}], {self.nodes[0].getnewaddress(): 1}) 2099 | tx = FromHex(CTransaction(), raw) 2100 | - assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex()) 2101 | + assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex(), True)
Named args so it's clear what the bool is please:
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, hexstring=serialize_with_bogus_witness(tx).hex(), iswitness=True)
Same below.
ACK fab30389839264e8999d60e91c9a894cf00f97c1
One suggested change inline.
utACK fae45c34d1
Milestone
0.21.0