message: Add mutation for functional test test_preferred_inv
  Add a booelan arg to test_preferred_inv to cover NONPREF_PEER_TX_DELAY
  as applied as a TxRequestTracker parameter in AddTxAnnouncement.
diff: @@ -47,6 +47,7 @@ TXID_RELAY_DELAY = 2 # seconds
  OVERLOADED_PEER_DELAY = 2 # seconds
  MAX_GETDATA_IN_FLIGHT = 100
  MAX_PEER_TX_ANNOUNCEMENTS = 5000
  +NONPREF_PEER_TX_DELAY = 2
  # Python test constants
  NUM_INBOUND = 10
  @@ -207,14 +208,24 @@ class TxDownloadTest(BitcoinTestFramework):
  with p2p_lock:
  assert_equal(peer_fallback.tx_getdata_count, 1)
  - def test_preferred_inv(self):
  - self.log.info('Check that invs from preferred peers are downloaded immediately')
  + def test_preferred_inv(self, preferred=False):
  + if preferred:
  + self.log.info('Check invs from preferred peers are downloaded immediately')
  self.restart_node(0, extra_args=['-whitelist=noban@127.0.0.1'])
  + else:
  + self.log.info('Check invs from non-preferred peers are downloaded after {} s'.format(NONPREF_PEER_TX_DELAY))
  + mock_time = int(time.time() + 1)
  + self.nodes[0].setmocktime(mock_time)
  peer = self.nodes[0].add_p2p_connection(TestP2PConn())
  peer.send_message(msg_inv([CInv(t=MSG_WTX, h=0xff00ff00)]))
  + peer.sync_with_ping()
  + if preferred:
  peer.wait_until(lambda: peer.tx_getdata_count >= 1, timeout=1)
  + else:
  with p2p_lock:
  - assert_equal(peer.tx_getdata_count, 1)
  + assert_equal(peer.tx_getdata_count, 0)
  + self.nodes[0].setmocktime(mock_time + NONPREF_PEER_TX_DELAY)
  + peer.wait_until(lambda: peer.tx_getdata_count >= 1, timeout=1)
  def test_txid_inv_delay(self, glob_wtxid=False):
  self.log.info('Check that inv from a txid-relay peers are delayed by {} s, with a wtxid peer {}'.format(TXID_RELAY_DELAY, glob_wtxid))
  @@ -261,6 +272,7 @@ class TxDownloadTest(BitcoinTestFramework):
  self.test_disconnect_fallback()
  self.test_notfound_fallback()
  self.test_preferred_inv()
  + self.test_preferred_inv(True)
  self.test_txid_inv_delay()
  self.test_txid_inv_delay(True)
  self.test_large_inv_batch()
  