From d6e7d9c281e822b64a3e50387dd8daad2ac10e93 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 25 Aug 2020 15:41:50 +0300 Subject: [PATCH] cli: invoke configureAddresses with pointer Otherwise configuration remains untouched outside of the method scope. --- cli/server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/server/server.go b/cli/server/server.go index cc83178f3..3f7170a8b 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -147,7 +147,7 @@ func initBCWithMetrics(cfg config.Config, log *zap.Logger) (*core.Blockchain, *m if err != nil { return nil, nil, nil, cli.NewExitError(err, 1) } - configureAddresses(cfg.ApplicationConfiguration) + configureAddresses(&cfg.ApplicationConfiguration) prometheus := metrics.NewPrometheusService(cfg.ApplicationConfiguration.Prometheus, log) pprof := metrics.NewPprofService(cfg.ApplicationConfiguration.Pprof, log) @@ -392,7 +392,7 @@ Main: // In case RPC or Prometheus or Pprof Address provided each of them will use it. // In case global Address (of the node) provided and RPC/Prometheus/Pprof don't have configured addresses they will // use global one. So Node and RPC and Prometheus and Pprof will run on one address. -func configureAddresses(cfg config.ApplicationConfiguration) { +func configureAddresses(cfg *config.ApplicationConfiguration) { if cfg.Address != "" { if cfg.RPC.Address == "" { cfg.RPC.Address = cfg.Address