Skip to content

Commit

Permalink
Merge bitcoin#31837: test: add missing sync to p2p_tx_download.py
Browse files Browse the repository at this point in the history
8fe552f test: add missing sync to p2p_tx_download.py (Martin Zumsande)

Pull request description:

  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.

  Fixes bitcoin#31833

ACKs for top commit:
  maflcko:
    lgtm ACK 8fe552f
  instagibbs:
    ACK 8fe552f

Tree-SHA512: fda935d8a4081b5ecae96f5a73c04f4bb91feaeb09b5c159ffd45cf16668c4345ff268c57f383ba7c7ff544ee07b21f97aa28f257ade809c18b9310837795e7a
  • Loading branch information
fanquake committed Feb 11, 2025
2 parents 79f02d5 + 8fe552f commit 2507ebd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/p2p_tx_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def test_preferred_tiebreaker_inv(self):
pref_peer = self.nodes[0].add_outbound_p2p_connection(
TestP2PConn(), wait_for_verack=True, p2p_idx=1, connection_type="outbound-full-relay")
pref_peer.send_message(msg_inv([CInv(t=MSG_WTX, h=0xff00ff00)]))
pref_peer.sync_with_ping()

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

Expand Down

0 comments on commit 2507ebd

Please sign in to comment.