Skip to content

Commit 2ba5d78

Browse files
ryanofskyMarcoFalke
authored andcommitted
[qa] Fix bug in compactblocks v2 merge
Bug caused the wait_for_block_announcement to be called on the wrong node, leading to nondeterminism and occasional test failures. Bug was introduced in merge commit: d075479 Merge bitcoin#8882: [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py Underlying commits which conflicted were: 27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 6976db2 [qa] Another attempt to fix race condition in p2p-compactblocks.py The first commit changed the test_compactblock_construction function signature and second commit added code which wasn't updated during the merge to use the new arguments. Suhas Daftuar <[email protected]> noticed the bug and suggested the fix. Github-Pull: bitcoin#9058 Rebased-From: 47e9659
1 parent eca9b46 commit 2ba5d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa/rpc-tests/p2p-compactblocks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ def test_compactblock_construction(self, node, test_node, version, use_witness_a
303303
assert(segwit_tx_generated) # check that our test is not broken
304304

305305
# Wait until we've seen the block announcement for the resulting tip
306-
tip = int(self.nodes[0].getbestblockhash(), 16)
307-
assert(self.test_node.wait_for_block_announcement(tip))
306+
tip = int(node.getbestblockhash(), 16)
307+
assert(test_node.wait_for_block_announcement(tip))
308308

309309
# Now mine a block, and look at the resulting compact block.
310310
test_node.clear_block_announcement()

0 commit comments

Comments
 (0)