Skip to content

Commit

Permalink
Check config only in the rebroadcast-transactions command
Browse files Browse the repository at this point in the history
  • Loading branch information
george-dorin committed Apr 26, 2024
1 parent 606c1fb commit 855ead4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .changeset/pink-schools-provide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"chainlink": patch
---

#bugfix Fixed an issue where some CLI commands were not executing config validation.
#bugfix Fixed an issue where the `rebroadcast-transactions` commands did not execute config validation.
5 changes: 0 additions & 5 deletions core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ type ChainlinkAppFactory struct{}

// NewApplication returns a new instance of the node with the given config.
func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, db *sqlx.DB) (app chainlink.Application, err error) {
err = cfg.Validate()
if err != nil {
return nil, err
}

err = initGlobals(cfg.Prometheus(), cfg.Tracing(), appLggr)
if err != nil {
appLggr.Errorf("Failed to initialize globals: %v", err)
Expand Down
5 changes: 5 additions & 0 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,11 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) {
}
}

err = s.Config.Validate()
if err != nil {
return err
}

lggr := logger.Sugared(s.Logger.Named("RebroadcastTransactions"))
db, err := pg.OpenUnlockedDB(s.Config.AppID(), s.Config.Database())
if err != nil {
Expand Down

0 comments on commit 855ead4

Please sign in to comment.