code: func (sp *serverPeer) OnTx(_ *peer.Peer, msg *wire.MsgTx) {
  	if cfg.BlocksOnly {
  		peerLog.Tracef("Ignoring tx %v from %v - blocksonly enabled",
  			msg.TxHash(), sp)
  		return
  	}
  
  	// Add the transaction to the known inventory for the peer.
  	// Convert the raw MsgTx to a btcutil.Tx which provides some convenience
  	// methods and things such as hash caching.
  	tx := btcutil.NewTx(msg)
  	iv := wire.NewInvVect(wire.InvTypeTx, tx.Hash())
  	sp.AddKnownInventory(iv)
  
  	// Queue the transaction up to be handled by the sync manager and
  	// intentionally block further receives until the transaction is fully
  	// processed and known good or bad.  This helps prevent a malicious peer
  	// from queuing up a bunch of bad transactions before disconnecting (or
  	// being disconnected) and wasting memory.
  	sp.server.syncManager.QueueTx(tx, sp.Peer, sp.txProcessed)
  	<-sp.txProcessed
  }
docs: // OnTx is invoked when a peer receives a tx bitcoin message.  It blocks
  // until the bitcoin transaction has been fully processed.  Unlock the block
  // handler this does not serialize all transactions through a single thread
  // transactions don't rely on the previous one in a linear fashion like blocks.