def filterMsgs(self, wrappedMsgs: deque) -> deque:
        """
        Filters messages by view number so that only the messages that have the
        current view number are retained.

        :param wrappedMsgs: the messages to filter
        """
        filtered = deque()
        while wrappedMsgs:
            wrappedMsg = wrappedMsgs.popleft()
            msg, sender = wrappedMsg
            if hasattr(msg, f.VIEW_NO.nm):
                reqViewNo = getattr(msg, f.VIEW_NO.nm)
                if reqViewNo == self.viewNo:
                    filtered.append(wrappedMsg)
                else:
                    self.discard(wrappedMsg,
                                 "its view no {} is less than the elector's {}"
                                 .format(reqViewNo, self.viewNo),
                                 logger.debug)
            else:
                filtered.append(wrappedMsg)

        return filtered
Filters messages by view number so that only the messages that have the
        current view number are retained.

        :param wrappedMsgs: the messages to filter