Skip to content

Commit fa6c300

Browse files
author
MarcoFalke
committed
test: Fix intermittent timeout in p2p_tx_download.py
1 parent ba7c67f commit fa6c300

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)