mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-01 09:35:52 -05:00
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.
This commit is contained in:
parent
b432e36742
commit
152a2dcdef
1 changed files with 5 additions and 0 deletions
|
@ -144,6 +144,11 @@ class PackageRelayTest(BitcoinTestFramework):
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue