Skip to content

Commit 809d7e7

Browse files
committed
Merge bitcoin/bitcoin#31751: test: fix intermittent timeout in p2p_1p1c_network.py
152a2dc test: fix intermittent timeout in p2p_1p1c_network.py (Martin Zumsande) Pull request description: The timeout is due to outstanding txrequests with python peers, which have the same timeout (`60s`) as the mempool sync timeout. I explained this in more detail in bitcoin/bitcoin#31721 (comment) and also mentioned there how to reproduce it. Fix this by disconnecting the python peers after they send their txns, they aren't needed after this point anyway because the main goal of the test is the sync between the 4 full nodes. Fixes #31721 ACKs for top commit: achow101: ACK 152a2dc instagibbs: reACK 152a2dc marcofleon: ACK 152a2dc glozow: reACK 152a2dc Tree-SHA512: 908c58933d8e9fcca91425fce1b7c9c7cb7121a6d26840630e03a442356ad2a327d1e087df72a19caa97024ea827593e10f2ff93838f88939458e73df9857df0
2 parents 6835e96 + 152a2dc commit 809d7e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/p2p_1p1c_network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ def run_test(self):
144144
for tx in transactions_to_presend[i]:
145145
peer.send_and_ping(msg_tx(tx))
146146

147+
# Disconnect python peers to clear outstanding orphan requests with them, avoiding timeouts.
148+
# We are only interested in the syncing behavior between real nodes.
149+
for i in range(self.num_nodes):
150+
self.nodes[i].disconnect_p2ps()
151+
147152
self.log.info("Submit full packages to node0")
148153
for package_hex in packages_to_submit:
149154
submitpackage_result = self.nodes[0].submitpackage(package_hex)

0 commit comments

Comments
 (0)