code: func RegisterEthService(stack *node.Node, cfg *eth.Config) {
  	var err error
  	if cfg.SyncMode == downloader.LightSync {
  		err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
  			return les.New(ctx, cfg)
  		})
  	} else {
  		err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
  			fullNode, err := eth.New(ctx, cfg)
  			if fullNode != nil && cfg.LightServ > 0 {
  				ls, _ := les.NewLesServer(fullNode, cfg)
  				fullNode.AddLesServer(ls)
  			}
  			return fullNode, err
  		})
  	}
  	if err != nil {
  		Fatalf("Failed to register the Ethereum service: %v", err)
  	}
  }
docs: // RegisterEthService adds an Ethereum client to the stack.