From 9ad02c9a577d0932fc285c78da7d4c600926c42a Mon Sep 17 00:00:00 2001 From: Jaynti Kanani Date: Fri, 15 May 2020 23:09:44 +0530 Subject: [PATCH] fix: heimdall url flag --- cmd/bor/chaincmd.go | 1 + cmd/bor/config.go | 2 +- cmd/utils/flags.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/bor/chaincmd.go b/cmd/bor/chaincmd.go index bbb8792a16e8..83d3261566ec 100644 --- a/cmd/bor/chaincmd.go +++ b/cmd/bor/chaincmd.go @@ -64,6 +64,7 @@ It expects the genesis file as argument.`, ArgsUsage: " ( ... ) ", Flags: []cli.Flag{ utils.DataDirFlag, + utils.HeimdallURLFlag, utils.CacheFlag, utils.SyncModeFlag, utils.GCModeFlag, diff --git a/cmd/bor/config.go b/cmd/bor/config.go index 4929d826eb0b..9202fec7c4da 100644 --- a/cmd/bor/config.go +++ b/cmd/bor/config.go @@ -151,7 +151,7 @@ func enableWhisper(ctx *cli.Context) bool { func makeFullNode(ctx *cli.Context) *node.Node { stack, cfg := makeConfigNode(ctx) - cfg.Eth.HeimdallURL = ctx.String(utils.HeimdallURLFlag.Name) + cfg.Eth.HeimdallURL = ctx.GlobalString(utils.HeimdallURLFlag.Name) log.Info("Connecting to heimdall service on...", "heimdallURL", cfg.Eth.HeimdallURL) utils.RegisterEthService(stack, &cfg.Eth) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index fa0aa9bf1630..78a70beabeba 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1694,7 +1694,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai if config.Clique != nil { engine = clique.New(config.Clique, chainDb) } else if config.Bor != nil { - cfg := ð.Config{Genesis: genesis} + cfg := ð.Config{Genesis: genesis, HeimdallURL: ctx.GlobalString(HeimdallURLFlag.Name)} workspace, err := ioutil.TempDir("", "console-tester-") if err != nil { Fatalf("failed to create temporary keystore: %v", err)