Skip to content

Commit

Permalink
Fixes typo and remove unnecessary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez committed Apr 22, 2024
1 parent 0cf63af commit 5a1f556
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changeset/olive-knives-happen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"chainlink": patch
---

#internal Generic Pluging `onchainSigningStrategy` support
#internal Generic Plugin `onchainSigningStrategy` support
8 changes: 8 additions & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
ocr2keepers21 "github.com/smartcontractkit/chainlink-automation/pkg/v3/plugin"
"github.com/smartcontractkit/chainlink-common/pkg/loop/reportingplugins/ocr3"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"

"github.com/smartcontractkit/chainlink/v2/core/config/env"

"github.com/smartcontractkit/chainlink-vrf/altbn_128"
Expand Down Expand Up @@ -547,6 +548,13 @@ func (d *Delegate) newServicesGenericPlugin(
if err != nil {
return nil, err
}
// NOTE: we don't need to validate the strategy, since that happens as part of creating the job.
// See: validate/validate.go's `validateSpec`.
onchainSigningStrategy := validate.OCR2OnchainSigningStrategy{}
err = json.Unmarshal(spec.OnchainSigningStrategy.Bytes(), &onchainSigningStrategy)
if err != nil {
return nil, err
}

plugEnv := env.NewPlugin(pCfg.PluginName)

Expand Down
2 changes: 0 additions & 2 deletions core/services/ocr2/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ func (o *OCR2OnchainSigningStrategy) PublicKey() (string, error) {
}

func validateGenericPluginSpec(ctx context.Context, spec *job.OCR2OracleSpec, rc plugins.RegistrarConfig) error {
fmt.Println("running validateGenericPluginSpec")
p := OCR2GenericPluginConfig{}
err := json.Unmarshal(spec.PluginConfig.Bytes(), &p)
if err != nil {
Expand All @@ -233,7 +232,6 @@ func validateGenericPluginSpec(ctx context.Context, spec *job.OCR2OracleSpec, rc
if err != nil {
return err
}
fmt.Println("public key", pk)
if pk == "" {
return errors.New("generic config invalid: must provide public key for the onchain signing strategy")
}
Expand Down

0 comments on commit 5a1f556

Please sign in to comment.