[NOD-1373] Make kaspactl use the default port for the relevant network if it's not provided. (#927)

This commit is contained in:
stasatdaglabs 2020-09-14 12:18:51 +03:00 committed by GitHub
parent e66de86a82
commit 1186cad9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,11 @@ func main() {
printErrorAndExit(fmt.Sprintf("error parsing command-line arguments: %s", err))
}
client, err := grpcclient.Connect(cfg.RPCServer)
rpcAddress, err := cfg.NetParams().NormalizeRPCServerAddress(cfg.RPCServer)
if err != nil {
printErrorAndExit(fmt.Sprintf("error parsing RPC server address: %s", err))
}
client, err := grpcclient.Connect(rpcAddress)
if err != nil {
printErrorAndExit(fmt.Sprintf("error connecting to the RPC server: %s", err))
}