Skip to content

Commit

Permalink
fix only one sync node
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyz committed Dec 25, 2018
1 parent d57a6e7 commit 04f75fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ var ServerCmd = &cobra.Command{
var (
explorer string
explorerLaddr string
syncNode bool
)

func init() {
registerFlagsHttpServer(ServerCmd)
registerFlagsDb(ServerCmd)

ServerCmd.PersistentFlags().BoolVar(&syncNode, "syncNode", false, "同步节点")
ServerCmd.PersistentFlags().StringVar(&explorer, "with-explorer", "", "the dir of explorer")
ServerCmd.PersistentFlags().StringVarP(&explorerLaddr, "explorerLaddr", "", "0.0.0.0:9528", "address of explorer listening")
}
Expand Down Expand Up @@ -111,7 +113,10 @@ func server(cmd *cobra.Command, args []string) error {
return nil
}

worker.Start()
if syncNode {
worker.Start()
}

if explorer != "" {
go func() {
wg.Add(1)
Expand Down

0 comments on commit 04f75fc

Please sign in to comment.