Skip to content

Commit 152a2dc

Browse files
committed
test: fix intermittent timeout in p2p_1p1c_network.py
The timeout is due to outstanding txrequests with python peers. Fix this by disconnecting these peers after they send their txns, they aren't needed after this point anyway.
1 parent b432e36 commit 152a2dc

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)