Skip to content

Commit

Permalink
remove unused func
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Oct 19, 2023
1 parent 24c5045 commit 91f850a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
16 changes: 1 addition & 15 deletions api/v1/cosmosfullnode_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ limitations under the License.
package v1

import (
"fmt"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
Expand Down Expand Up @@ -542,7 +540,7 @@ type ChainSpec struct {
// When provided, the operator will automatically upgrade the chain as it reaches the specified heights.
// If not provided, the operator will not upgrade the chain, and will use the image specified in the pod spec.
// +optional
Versions ChainVersions `json:"versions"`
Versions []ChainVersion `json:"versions"`
}

type ChainVersion struct {
Expand All @@ -557,18 +555,6 @@ type ChainVersion struct {
SetHaltHeight bool `json:"setHaltHeight,omitempty"`
}

type ChainVersions []ChainVersion

func (cv ChainVersions) Validate() error {
lastHeight := uint64(0)
for _, v := range cv {
if v.UpgradeHeight < lastHeight {
return fmt.Errorf("upgrade height %d is less than last upgrade height %d. upgrades must be sequential", v.UpgradeHeight, lastHeight)
}
}
return nil
}

// CometConfig configures the config.toml.
type CometConfig struct {
// Comma delimited list of p2p nodes in <ID>@<IP>:<PORT> format to keep persistent p2p connections.
Expand Down
21 changes: 1 addition & 20 deletions api/v1/zz_generated.deepcopy.go

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

0 comments on commit 91f850a

Please sign in to comment.