Skip to content

Commit

Permalink
Add NOTE for enum duplication and todo to resovle it (#11444)
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 authored Dec 1, 2023
1 parent f4a97b2 commit 60a328e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
)

const (
// NOTE: This enum should be kept in sync with evmregistry/v21/mercury/upkeep_failure_reasons.go
// TODO (AUTO-7928) Remove this duplication
// upkeep failure onchain reasons
UpkeepFailureReasonNone uint8 = 0
UpkeepFailureReasonUpkeepCancelled uint8 = 1
Expand All @@ -30,6 +32,8 @@ const (
UpkeepFailureReasonSimulationFailed uint8 = 35
UpkeepFailureReasonTxHashReorged uint8 = 36

// NOTE: This enum should be kept in sync with evmregistry/v21/mercury/upkeep_states.go
// TODO (AUTO-7928) Remove this duplication
// pipeline execution error
NoPipelineError uint8 = 0
CheckBlockTooOld uint8 = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package mercury

type MercuryUpkeepFailureReason uint8

// NOTE: This enum should be kept in sync with evmregistry/v21/encoding/interface.go
// TODO (AUTO-7928) Remove this duplication
const (
// upkeep failure onchain reasons
MercuryUpkeepFailureReasonNone MercuryUpkeepFailureReason = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package mercury

type MercuryUpkeepState uint8

// NOTE: This enum should be kept in sync with evmregistry/v21/encoding/interface.go
// TODO (AUTO-7928) Remove this duplication
const (
NoPipelineError MercuryUpkeepState = 0
RpcFlakyFailure MercuryUpkeepState = 3
Expand Down

0 comments on commit 60a328e

Please sign in to comment.