diff --git a/cmd/harmony/flags.go b/cmd/harmony/flags.go index 8f5a0484a..74e66e7bd 100644 --- a/cmd/harmony/flags.go +++ b/cmd/harmony/flags.go @@ -410,8 +410,11 @@ func applyNetworkFlags(cmd *cobra.Command, cfg *harmonyConfig) { if cli.IsFlagChanged(cmd, dnsPortFlag) { cfg.Network.DNSSyncPort = cli.GetIntFlagValue(cmd, dnsPortFlag) } else if cli.IsFlagChanged(cmd, legacyDNSPortFlag) { - val := cli.GetIntFlagValue(cmd, legacyDNSPortFlag) - cfg.Network.LegacyDNSPort = &val + // Still using node.sh to launch the node. Flag --dns_port should have + // 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 } } diff --git a/node/node.go b/node/node.go index ef5c730ec..c17558234 100644 --- a/node/node.go +++ b/node/node.go @@ -1043,9 +1043,6 @@ func New( node.serviceManager = service.NewManager() - node.stateSync = node.createStateSync() - node.beaconSync = node.createStateSync() - return &node }