Skip to content

Commit

Permalink
Move initGlobals higher up
Browse files Browse the repository at this point in the history
  • Loading branch information
4of9 committed Oct 30, 2024
1 parent a747ecc commit 34beeb3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,16 @@ func (s *Shell) runNode(c *cli.Context) error {
return errors.Wrap(err, "error authenticating keystore")
}

err2 := app.GetKeyStore().CSA().EnsureKey(rootCtx)
if err2 != nil {
return errors.Wrap(err2, "failed to ensure CSA key")
}

err2 = initGlobals(cfg.Prometheus(), cfg.Tracing(), cfg.Telemetry(), lggr, keyStore.CSA())
if err2 != nil {
return errors.Wrap(err2, "failed to init globals")
}

legacyEVMChains := app.GetRelayers().LegacyEVMChains()

if s.Config.EVMEnabled() {
Expand Down Expand Up @@ -474,16 +484,6 @@ func (s *Shell) runNode(c *cli.Context) error {
}
}

err2 := app.GetKeyStore().CSA().EnsureKey(rootCtx)
if err2 != nil {
return errors.Wrap(err2, "failed to ensure CSA key")
}

err2 = initGlobals(cfg.Prometheus(), cfg.Tracing(), cfg.Telemetry(), lggr, keyStore.CSA())
if err2 != nil {
return errors.Wrap(err2, "failed to init globals")
}

if e := checkFilePermissions(lggr, s.Config.RootDir()); e != nil {
lggr.Warn(e)
}
Expand Down

0 comments on commit 34beeb3

Please sign in to comment.