Skip to content

Commit 10bd32a

Browse files
committed
Merge bitcoin/bitcoin#29933: test: Fix intermittent timeout in p2p_tx_download.py
fa6c300 test: Fix intermittent timeout in p2p_tx_download.py (MarcoFalke) Pull request description: Currently the test passes, but may fail during shutdown, because blocks and transactions are synced with `NUM_INBOUND` * `self.num_nodes` peers, which may take a long time. There is no need for this test to have this amount of inbounds. So avoid the extraneous inbounds to speed up the test and avoid the intermittent test failures. ACKs for top commit: instagibbs: ACK fa6c300 fjahr: Thanks, ACK fa6c300 achow101: ACK fa6c300 theStack: ACK fa6c300 Tree-SHA512: 0a480fd1db293ed8571ae629557cf81d5a79ec883e9e635f22c8a7cf48427161249ad2180b66c67661306f696c977b8e06ad520bd11911f119c9c95b3ffc9134
2 parents dec74c0 + fa6c300 commit 10bd32a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

test/functional/p2p_tx_download.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,22 @@ def run_test(self):
284284

285285
# Run each test against new bitcoind instances, as setting mocktimes has long-term effects on when
286286
# the next trickle relay event happens.
287-
for test in [self.test_in_flight_max, self.test_inv_block, self.test_tx_requests,
288-
self.test_rejects_filter_reset]:
287+
for test, with_inbounds in [
288+
(self.test_in_flight_max, True),
289+
(self.test_inv_block, True),
290+
(self.test_tx_requests, True),
291+
(self.test_rejects_filter_reset, False),
292+
]:
289293
self.stop_nodes()
290294
self.start_nodes()
291295
self.connect_nodes(1, 0)
292296
# Setup the p2p connections
293297
self.peers = []
294-
for node in self.nodes:
295-
for _ in range(NUM_INBOUND):
296-
self.peers.append(node.add_p2p_connection(TestP2PConn()))
297-
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
298+
if with_inbounds:
299+
for node in self.nodes:
300+
for _ in range(NUM_INBOUND):
301+
self.peers.append(node.add_p2p_connection(TestP2PConn()))
302+
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
298303
test()
299304

300305

0 commit comments

Comments
 (0)