code: func (s *MockDeliverServer) DeliverFiltered(srv pb.Deliver_DeliverFilteredServer) error {
  	if s.status != cb.Status_UNKNOWN {
  		err1 := srv.Send(&pb.DeliverResponse{
  			Type: &pb.DeliverResponse_Status{
  				Status: s.status,
  			},
  		})
  		return errors.Errorf("returning error status: %s %s", s.status, err1)
  	}
  	disconnect := make(chan bool)
  
  	go s.handleFilteredEvents(srv, disconnect)
  	for {
  		envelope, err := srv.Recv()
  		if err == io.EOF || envelope == nil {
  			disconnect <- true
  			break
  		}
  
  		err = s.disconnectErr()
  		if err != nil {
  			disconnect <- true
  			return err
  		}
  
  		err1 := srv.Send(&pb.DeliverResponse{
  			Type: &pb.DeliverResponse_FilteredBlock{
  				FilteredBlock: &pb.FilteredBlock{},
  			},
  		})
  		if err1 != nil {
  			return err1
  		}
  		if err == io.EOF {
  			test.Logf("*** mockdelserver err is io.EOF or envelope == nil, disconnecting from DeliverFiltered..")
  			disconnect <- true
  			break
  		}
  	}
  	return nil
  }
docs: // DeliverFiltered delivers a stream of filtered blocks