0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-18 11:57:37 -05:00

Merge bitcoin/bitcoin#31837: test: add missing sync to p2p_tx_download.py

8fe552fe6e 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 #31833

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

Tree-SHA512: fda935d8a4081b5ecae96f5a73c04f4bb91feaeb09b5c159ffd45cf16668c4345ff268c57f383ba7c7ff544ee07b21f97aa28f257ade809c18b9310837795e7a
This commit is contained in:
merge-script 2025-02-11 09:58:45 +01:00
commit 2507ebdf1b
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -274,6 +274,7 @@ class TxDownloadTest(BitcoinTestFramework):
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)