Skip to content

Commit

Permalink
Revert "core/services/chainlink: log warn instead of error if CSA key…
Browse files Browse the repository at this point in the history
… not available for feeds service (#10543)" (#10782)

This reverts commit 73966ef.
  • Loading branch information
jmank88 authored Sep 25, 2023
1 parent 661dd01 commit 98ae768
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,30 +421,26 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
}
}

var feedsService feeds.Service = &feeds.NullService{}
var feedsService feeds.Service
if cfg.Feature().FeedsManager() {
if keys, err := opts.KeyStore.CSA().GetAll(); err != nil {
globalLogger.Warn("[Feeds Service] Unable to start without CSA key", "err", err)
} else if len(keys) == 0 {
globalLogger.Warn("[Feeds Service] Unable to start without CSA key")
} else {
feedsORM := feeds.NewORM(db, opts.Logger, cfg.Database())
feedsService = feeds.NewService(
feedsORM,
jobORM,
db,
jobSpawner,
keyStore,
cfg.Insecure(),
cfg.JobPipeline(),
cfg.OCR(),
cfg.OCR2(),
cfg.Database(),
legacyEVMChains,
globalLogger,
opts.Version,
)
}
feedsORM := feeds.NewORM(db, opts.Logger, cfg.Database())
feedsService = feeds.NewService(
feedsORM,
jobORM,
db,
jobSpawner,
keyStore,
cfg.Insecure(),
cfg.JobPipeline(),
cfg.OCR(),
cfg.OCR2(),
cfg.Database(),
legacyEVMChains,
globalLogger,
opts.Version,
)
} else {
feedsService = &feeds.NullService{}
}

for _, s := range srvcs {
Expand Down

0 comments on commit 98ae768

Please sign in to comment.