mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 02:59:31 +08:00
test: Read debug log for self-checking comment
The DataStream comment was a bit stale, because it was using CDataStream. Fix it by using assert_debug_log for a self-documenting and self-checking test code.
This commit is contained in:
@@ -1198,8 +1198,8 @@ class SegWitTest(BitcoinTestFramework):
|
||||
block.vtx = [block.vtx[0]]
|
||||
self.update_witness_block_with_transactions(block, [tx2])
|
||||
# This block doesn't result in a specific reject reason, but an iostream exception:
|
||||
# "Exception 'CDataStream::read(): end of data: unspecified iostream_category error' (...) caught"
|
||||
test_witness_block(self.nodes[0], self.test_node, block, accepted=False)
|
||||
with self.nodes[0].assert_debug_log(["Exception 'DataStream::read(): end of data"]):
|
||||
test_witness_block(self.nodes[0], self.test_node, block, accepted=False)
|
||||
|
||||
# Now make one of the intermediate witnesses be incorrect
|
||||
tx2.wit.vtxinwit.append(CTxInWitness())
|
||||
|
||||
Reference in New Issue
Block a user