mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 19:21:28 +02:00
test: Add various low-level p2p tests
This commit is contained in:
@ -152,6 +152,10 @@ class TxDownloadTest(BitcoinTestFramework):
|
||||
wait_until(lambda: p.tx_getdata_count == MAX_GETDATA_IN_FLIGHT + 2)
|
||||
self.nodes[0].setmocktime(0)
|
||||
|
||||
def test_spurious_notfound(self):
|
||||
self.log.info('Check that spurious notfound is ignored')
|
||||
self.nodes[0].p2ps[0].send_message(msg_notfound(vec=[CInv(1, 1)]))
|
||||
|
||||
def run_test(self):
|
||||
# Setup the p2p connections
|
||||
self.peers = []
|
||||
@ -161,6 +165,8 @@ class TxDownloadTest(BitcoinTestFramework):
|
||||
|
||||
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
|
||||
|
||||
self.test_spurious_notfound()
|
||||
|
||||
# Test the in-flight max first, because we want no transactions in
|
||||
# flight ahead of this test.
|
||||
self.test_in_flight_max()
|
||||
|
Reference in New Issue
Block a user