|
|
@ -64,6 +64,7 @@ var ( |
|
|
|
httpRosettaEnabledFlag, |
|
|
|
httpRosettaEnabledFlag, |
|
|
|
httpIPFlag, |
|
|
|
httpIPFlag, |
|
|
|
httpPortFlag, |
|
|
|
httpPortFlag, |
|
|
|
|
|
|
|
httpAuthPortFlag, |
|
|
|
httpRosettaPortFlag, |
|
|
|
httpRosettaPortFlag, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -568,6 +569,11 @@ var ( |
|
|
|
Usage: "rpc port to listen for HTTP requests", |
|
|
|
Usage: "rpc port to listen for HTTP requests", |
|
|
|
DefValue: defaultConfig.HTTP.Port, |
|
|
|
DefValue: defaultConfig.HTTP.Port, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
httpAuthPortFlag = cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "http.auth-port", |
|
|
|
|
|
|
|
Usage: "rpc port to listen for auth HTTP requests", |
|
|
|
|
|
|
|
DefValue: defaultConfig.HTTP.AuthPort, |
|
|
|
|
|
|
|
} |
|
|
|
httpRosettaEnabledFlag = cli.BoolFlag{ |
|
|
|
httpRosettaEnabledFlag = cli.BoolFlag{ |
|
|
|
Name: "http.rosetta", |
|
|
|
Name: "http.rosetta", |
|
|
|
Usage: "enable HTTP / Rosetta requests", |
|
|
|
Usage: "enable HTTP / Rosetta requests", |
|
|
@ -593,6 +599,11 @@ func applyHTTPFlags(cmd *cobra.Command, config *harmonyconfig.HarmonyConfig) { |
|
|
|
isRPCSpecified = true |
|
|
|
isRPCSpecified = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if cli.IsFlagChanged(cmd, httpAuthPortFlag) { |
|
|
|
|
|
|
|
config.HTTP.AuthPort = cli.GetIntFlagValue(cmd, httpAuthPortFlag) |
|
|
|
|
|
|
|
isRPCSpecified = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if cli.IsFlagChanged(cmd, httpRosettaPortFlag) { |
|
|
|
if cli.IsFlagChanged(cmd, httpRosettaPortFlag) { |
|
|
|
config.HTTP.RosettaPort = cli.GetIntFlagValue(cmd, httpRosettaPortFlag) |
|
|
|
config.HTTP.RosettaPort = cli.GetIntFlagValue(cmd, httpRosettaPortFlag) |
|
|
|
isRosettaSpecified = true |
|
|
|
isRosettaSpecified = true |
|
|
@ -1336,6 +1347,7 @@ func applyLegacyMiscFlags(cmd *cobra.Command, config *harmonyconfig.HarmonyConfi |
|
|
|
legacyPort := cli.GetIntFlagValue(cmd, legacyPortFlag) |
|
|
|
legacyPort := cli.GetIntFlagValue(cmd, legacyPortFlag) |
|
|
|
config.P2P.Port = legacyPort |
|
|
|
config.P2P.Port = legacyPort |
|
|
|
config.HTTP.Port = nodeconfig.GetRPCHTTPPortFromBase(legacyPort) |
|
|
|
config.HTTP.Port = nodeconfig.GetRPCHTTPPortFromBase(legacyPort) |
|
|
|
|
|
|
|
config.HTTP.AuthPort = nodeconfig.GetRPCAuthHTTPPortFromBase(legacyPort) |
|
|
|
config.HTTP.RosettaPort = nodeconfig.GetRosettaHTTPPortFromBase(legacyPort) |
|
|
|
config.HTTP.RosettaPort = nodeconfig.GetRosettaHTTPPortFromBase(legacyPort) |
|
|
|
config.WS.Port = nodeconfig.GetWSPortFromBase(legacyPort) |
|
|
|
config.WS.Port = nodeconfig.GetWSPortFromBase(legacyPort) |
|
|
|
|
|
|
|
|
|
|
|