code: func invSummary(invList []*wire.InvVect) string {
  	// No inventory.
  	invLen := len(invList)
  	if invLen == 0 {
  		return "empty"
  	}
  
  	// One inventory item.
  	if invLen == 1 {
  		iv := invList[0]
  		switch iv.Type {
  		case wire.InvTypeError:
  			return fmt.Sprintf("error %s", iv.Hash)
  		case wire.InvTypeWitnessBlock:
  			return fmt.Sprintf("witness block %s", iv.Hash)
  		case wire.InvTypeBlock:
  			return fmt.Sprintf("block %s", iv.Hash)
  		case wire.InvTypeWitnessTx:
  			return fmt.Sprintf("witness tx %s", iv.Hash)
  		case wire.InvTypeTx:
  			return fmt.Sprintf("tx %s", iv.Hash)
  		}
  
  		return fmt.Sprintf("unknown (%d) %s", uint32(iv.Type), iv.Hash)
  	}
  
  	// More than one inv item.
  	return fmt.Sprintf("size %d", invLen)
  }
docs: // invSummary returns an inventory message as a human-readable string.