mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge #16459: [qa] Fix race condition in example_test.py
d9ab0ffa38
[qa] Fix race condition in example_test.py (Suhas Daftuar) Pull request description: There's a race between sending a getdata for a bunch of blocks with the node receiving those blocks from a peer, which could cause test failure. Fix this. ACKs for top commit: MarcoFalke: ACKd9ab0ffa38
laanwj: ACKd9ab0ffa38
promag: ACKd9ab0ffa38
. Tree-SHA512: c891f209eb2492f44e47da52ee6df950ff874ae26d2739011aca940d1caff6cedbac032b6509adbed07044c14fd711ba9d4d0e35c0f70bb2691f2ea4a46672ed
This commit is contained in:
commit
fcc4025c12
1 changed files with 4 additions and 1 deletions
|
@ -186,12 +186,15 @@ class ExampleTest(BitcoinTestFramework):
|
|||
self.log.info("Connect node2 and node1")
|
||||
connect_nodes(self.nodes[1], 2)
|
||||
|
||||
self.log.info("Wait for node2 to receive all the blocks from node1")
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("Add P2P connection to node2")
|
||||
self.nodes[0].disconnect_p2ps()
|
||||
|
||||
self.nodes[2].add_p2p_connection(BaseNode())
|
||||
|
||||
self.log.info("Wait for node2 reach current tip. Test that it has propagated all the blocks to us")
|
||||
self.log.info("Test that node2 propagates all the blocks to us")
|
||||
|
||||
getdata_request = msg_getdata()
|
||||
for block in blocks:
|
||||
|
|
Loading…
Add table
Reference in a new issue