Skip to content

Commit

Permalink
Remove encode observation from merkleroot subprocessor
Browse files Browse the repository at this point in the history
Signed-off-by: asoliman <[email protected]>
  • Loading branch information
asoliman92 committed Sep 4, 2024
1 parent b0dfa14 commit f19b01d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions commit/merkleroot/types.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package merkleroot

import (
"encoding/json"
"fmt"
"sort"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"
Expand All @@ -16,10 +14,6 @@ type Query struct {
MerkleRoots []cciptypes.MerkleRootChain
}

func (q Query) Encode() ([]byte, error) {
return json.Marshal(q)
}

func NewCommitQuery(rmnOnRampMaxSeqNums []plugintypes.SeqNumChain, merkleRoots []cciptypes.MerkleRootChain) Query {
return Query{
RmnOnRampMaxSeqNums: rmnOnRampMaxSeqNums,
Expand All @@ -34,15 +28,6 @@ type Observation struct {
FChain map[cciptypes.ChainSelector]int `json:"fChain"`
}

func (obs Observation) Encode() ([]byte, error) {
encodedObservation, err := json.Marshal(obs)
if err != nil {
return nil, fmt.Errorf("failed to encode MerkleObs: %w", err)
}

return encodedObservation, nil
}

// MerkleAggregatedObservation is the aggregation of a list of observations
type MerkleAggregatedObservation struct {
// A map from chain selectors to the list of merkle roots observed for each chain
Expand Down

0 comments on commit f19b01d

Please sign in to comment.