Skip to content

Commit

Permalink
Minor nits
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez committed Feb 11, 2025
1 parent f1f3074 commit a222adf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions pkg/capabilities/consensus/ocr3/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import (
)

const (
defaultMaxPhaseOutputBytes = 1000000 // 1 MB
defaultMaxReportCount = 20
defaultMaxPhaseOutputBytes = 1000000 // 1 MB
defaultMaxReportCount = 20
defaultBatchSize = 20
defaultOutcomePruningThreshold = 3600
)

type factory struct {
Expand All @@ -40,6 +42,7 @@ func (o *factory) NewReportingPlugin(_ context.Context, config ocr3types.Reporti
var configProto types.ReportingPluginConfig
err := proto.Unmarshal(config.OffchainConfig, &configProto)
if err != nil {
// an empty byte array will be unmarshalled into zero values without error
return nil, ocr3types.ReportingPluginInfo{}, err
}
if configProto.MaxQueryLengthBytes <= 0 {
Expand Down
6 changes: 2 additions & 4 deletions pkg/capabilities/consensus/ocr3/ocr3.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ type Config struct {
}

const (
defaultRequestExpiry time.Duration = 20 * time.Second
defaultBatchSize = 20
defaultSendBufferSize = 10
defaultOutcomePruningThreshold = 3600
defaultRequestExpiry = 20 * time.Second
defaultSendBufferSize = 10
)

func NewOCR3(config Config) *Capability {
Expand Down

0 comments on commit a222adf

Please sign in to comment.