code: func (g *gossipServiceImpl) validateMsg(msg proto.ReceivedMessage) bool {
  	if err := msg.GetGossipMessage().IsTagLegal(); err != nil {
  		g.logger.Warningf("Tag of %v isn't legal: %v", msg.GetGossipMessage(), errors.WithStack(err))
  		return false
  	}
  
  	if msg.GetGossipMessage().IsStateInfoMsg() {
  		if err := g.validateStateInfoMsg(msg.GetGossipMessage()); err != nil {
  			g.logger.Warningf("StateInfo message %v is found invalid: %v", msg, err)
  			return false
  		}
  	}
  	return true
  }
docs: // validateMsg checks the signature of the message if exists,
  // and also checks that the tag matches the message type