Skip to content

Commit

Permalink
Merge bitcoin#31751: test: fix intermittent timeout in p2p_1p1c_netwo…
Browse files Browse the repository at this point in the history
…rk.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#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 bitcoin#31721

ACKs for top commit:
  achow101:
    ACK 152a2dc
  instagibbs:
    reACK 152a2dc
  marcofleon:
    ACK 152a2dc
  glozow:
    reACK 152a2dc

Tree-SHA512: 908c58933d8e9fcca91425fce1b7c9c7cb7121a6d26840630e03a442356ad2a327d1e087df72a19caa97024ea827593e10f2ff93838f88939458e73df9857df0
  • Loading branch information
achow101 committed Jan 29, 2025
2 parents 6835e96 + 152a2dc commit 809d7e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/functional/p2p_1p1c_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ def run_test(self):
for tx in transactions_to_presend[i]:
peer.send_and_ping(msg_tx(tx))

# Disconnect python peers to clear outstanding orphan requests with them, avoiding timeouts.
# We are only interested in the syncing behavior between real nodes.
for i in range(self.num_nodes):
self.nodes[i].disconnect_p2ps()

self.log.info("Submit full packages to node0")
for package_hex in packages_to_submit:
submitpackage_result = self.nodes[0].submitpackage(package_hex)
Expand Down

0 comments on commit 809d7e7

Please sign in to comment.