Skip to content

Commit 8fe552f

Browse files
committed
test: add missing sync to p2p_tx_download.py
This prevents intermittent failures - if the node hasn't processed the inv from the outbound peer before the mocktime bump, the peer won't be preferred after the other inv timeouts, failing the test . Therefore, add a sync, just like there is one after the send_message calls in the previous lines.
1 parent 1d813e4 commit 8fe552f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/p2p_tx_download.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def test_preferred_tiebreaker_inv(self):
274274
pref_peer = self.nodes[0].add_outbound_p2p_connection(
275275
TestP2PConn(), wait_for_verack=True, p2p_idx=1, connection_type="outbound-full-relay")
276276
pref_peer.send_message(msg_inv([CInv(t=MSG_WTX, h=0xff00ff00)]))
277+
pref_peer.sync_with_ping()
277278

278279
assert_equal(len(self.nodes[0].getpeerinfo()), NUM_INBOUND + 2)
279280

0 commit comments

Comments
 (0)