Skip to content

Commit

Permalink
Allow passing aggregaion config to identical consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
vreff committed Jan 9, 2025
1 parent db7919d commit 34eba99
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/capabilities/consensus/ocr3/ocr3cap/identical_consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
// Note this isn't generated because generics isn't supported in json schema

type IdenticalConsensusConfig[T any] struct {
Encoder Encoder
EncoderConfig EncoderConfig
ReportID ReportId
KeyID KeyId
Encoder Encoder
EncoderConfig EncoderConfig
AggregationConfig map[string]interface{}
ReportID ReportId
KeyID KeyId
}

func (c IdenticalConsensusConfig[T]) New(w *sdk.WorkflowSpecFactory, ref string, input IdenticalConsensusInput[T]) SignedReportCap {
Expand All @@ -22,6 +23,7 @@ func (c IdenticalConsensusConfig[T]) New(w *sdk.WorkflowSpecFactory, ref string,
Config: map[string]any{
"encoder": c.Encoder,
"encoder_config": c.EncoderConfig,
"aggregation_config": c.AggregationConfig,
"aggregation_method": "identical",
"report_id": c.ReportID,
"key_id": c.KeyID,
Expand Down

0 comments on commit 34eba99

Please sign in to comment.