Merge 82ba505134 into merged_master (Bitcoin PR bitcoin/bitcoin#31759)

This commit is contained in:
ivanlele 2026-04-14 13:46:45 +00:00
commit 64be30c82c
No known key found for this signature in database

View file

@ -49,12 +49,14 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
assert node.getblockchaininfo()['initialblockdownload']
self.wait_until(lambda: all(peer['minfeefilter'] == MAX_FEE_FILTER for peer in node.getpeerinfo()))
self.nodes[0].setmocktime(int(time.time()))
self.log.info("Check that nodes don't send getdatas for transactions while still in IBD")
peer_inver = self.nodes[0].add_p2p_connection(P2PDataStore())
txid = 0xdeadbeef
peer_inver.send_and_ping(msg_inv([CInv(t=MSG_WTX, h=txid)]))
# The node should not send a getdata, but if it did, it would first delay 2 seconds
self.nodes[0].setmocktime(int(time.time() + NONPREF_PEER_TX_DELAY))
self.nodes[0].bumpmocktime(NONPREF_PEER_TX_DELAY)
peer_inver.sync_with_ping()
with p2p_lock:
assert txid not in peer_inver.getdata_requests