diff options
author | Russell Yanofsky <russ@chaincode.com> | 2016-10-24 15:33:14 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-11-19 23:53:01 +0100 |
commit | 2ba5d784276783716bbf27b458514c4c3f44f4b6 (patch) | |
tree | fbb643de2edc8b9b23c7111f230958d308c261bd | |
parent | eca9b4653788570c25e646dcdfa9ba088e89f20e (diff) | |
download | bitcoin-2ba5d784276783716bbf27b458514c4c3f44f4b6.tar.xz |
[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 #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 <sdaftuar@chaincode.com> noticed the bug and suggested the fix.
Github-Pull: #9058
Rebased-From: 47e9659ecfbe07077a4564591095bd5510e0f917
-rwxr-xr-x | qa/rpc-tests/p2p-compactblocks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index c20cbede5d..0abb9f9869 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -303,8 +303,8 @@ class CompactBlocksTest(BitcoinTestFramework): assert(segwit_tx_generated) # check that our test is not broken # Wait until we've seen the block announcement for the resulting tip - tip = int(self.nodes[0].getbestblockhash(), 16) - assert(self.test_node.wait_for_block_announcement(tip)) + tip = int(node.getbestblockhash(), 16) + assert(test_node.wait_for_block_announcement(tip)) # Now mine a block, and look at the resulting compact block. test_node.clear_block_announcement() |