From 5be1c10bdae3922833deccc3fb681a4d7d32dac6 Mon Sep 17 00:00:00 2001 From: Jacky Wang Date: Wed, 21 Apr 2021 23:07:25 -0700 Subject: [PATCH] [cmd] more fixes --- cmd/harmony/flags.go | 7 +++++-- node/node.go | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }