code: func (sp *ServerPeer) OnInv(p *peer.Peer, msg *wire.MsgInv) {
  	log.Tracef("Got inv with %d items from %s", len(msg.InvList), p.Addr())
  	newInv := wire.NewMsgInvSizeHint(uint(len(msg.InvList)))
  	for _, invVect := range msg.InvList {
  		if invVect.Type == wire.InvTypeTx {
  			log.Tracef("Ignoring tx %s in inv from %v -- "+
  				"SPV mode", invVect.Hash, sp)
  			if sp.ProtocolVersion() >= wire.BIP0037Version {
  				log.Infof("Peer %v is announcing "+
  					"transactions -- disconnecting", sp)
  				sp.Disconnect()
  				return
  			}
  			continue
  		}
  		err := newInv.AddInvVect(invVect)
  		if err != nil {
  			log.Errorf("Failed to add inventory vector: %s", err)
  			break
  		}
  	}
  
  	if len(newInv.InvList) > 0 {
  		sp.server.blockManager.QueueInv(newInv, sp)
  	}
  }
docs: // OnInv is invoked when a peer receives an inv bitcoin message and is
  // used to examine the inventory being advertised by the remote peer and react
  // accordingly.  We pass the message down to blockmanager which will call
  // QueueMessage with any appropriate responses.