Skip to content

Commit

Permalink
Run generate types and use gen'd type, add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vreff committed Jan 9, 2025
1 parent 34eba99 commit c01dbf0
Show file tree
Hide file tree
Showing 10 changed files with 259 additions and 664 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
type IdenticalConsensusConfig[T any] struct {
Encoder Encoder
EncoderConfig EncoderConfig
AggregationConfig map[string]interface{}
AggregationConfig AggregationConfig
ReportID ReportId
KeyID KeyId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ func TestIdenticalConsensus(t *testing.T) {
trigger := basictrigger.TriggerConfig{Name: "1234", Number: 1}.New(workflow)

consensus := ocr3.IdenticalConsensusConfig[basictrigger.TriggerOutputs]{
Encoder: ocr3.EncoderEVM,
EncoderConfig: ocr3.EncoderConfig{},
ReportID: "0001",
KeyID: "evm",
Encoder: ocr3.EncoderEVM,
EncoderConfig: ocr3.EncoderConfig{},
AggregationConfig: ocr3.AggregationConfig{},
ReportID: "0001",
KeyID: "evm",
}.New(workflow, "consensus", ocr3.IdenticalConsensusInput[basictrigger.TriggerOutputs]{
Observation: trigger,
Encoder: "evm",
Expand Down Expand Up @@ -66,6 +67,7 @@ func TestIdenticalConsensus(t *testing.T) {
"encoder": "EVM",
"encoder_config": map[string]any{},
"aggregation_method": "identical",
"aggregation_config": map[string]any{},
"report_id": "0001",
"key_id": "evm",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"type": "object",
"additionalProperties": true
},
"aggregation_config": {
"type": "object",
"additionalProperties": true
},
"key_id" : {
"type": "string",
"examples": [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

184 changes: 35 additions & 149 deletions pkg/capabilities/consensus/ocr3/types/ocr3_types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c01dbf0

Please sign in to comment.