From fa879db735281d2cce123dbd59d20c7339b2b4ee Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 2 Feb 2026 16:35:08 +0100 Subject: [PATCH] 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. --- test/functional/p2p_segwit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index 88b2bcbb158..17f8085b44f 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -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())