[cmd] more fixes

pull/3684/head
Jacky Wang 4 years ago committed by Leo Chen
parent 42bd346875
commit 5be1c10bda
  1. 7
      cmd/harmony/flags.go
  2. 3
      node/node.go

@ -410,8 +410,11 @@ func applyNetworkFlags(cmd *cobra.Command, cfg *harmonyConfig) {
if cli.IsFlagChanged(cmd, dnsPortFlag) { if cli.IsFlagChanged(cmd, dnsPortFlag) {
cfg.Network.DNSSyncPort = cli.GetIntFlagValue(cmd, dnsPortFlag) cfg.Network.DNSSyncPort = cli.GetIntFlagValue(cmd, dnsPortFlag)
} else if cli.IsFlagChanged(cmd, legacyDNSPortFlag) { } else if cli.IsFlagChanged(cmd, legacyDNSPortFlag) {
val := cli.GetIntFlagValue(cmd, legacyDNSPortFlag) // Still using node.sh to launch the node. Flag --dns_port should have
cfg.Network.LegacyDNSPort = &val // port arithmetic of actual port being val - 3000.
rawPort := cli.GetIntFlagValue(cmd, legacyDNSPortFlag)
mutatedPort, _ := strconv.Atoi(legacysync.GetSyncingPort(strconv.Itoa(rawPort)))
cfg.Network.DNSSyncPort = mutatedPort
} }
} }

@ -1043,9 +1043,6 @@ func New(
node.serviceManager = service.NewManager() node.serviceManager = service.NewManager()
node.stateSync = node.createStateSync()
node.beaconSync = node.createStateSync()
return &node return &node
} }

Loading…
Cancel
Save