Skip to content

Commit

Permalink
merge master resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Jan 15, 2025
2 parents 85f63af + 9d65a2f commit fd83c05
Show file tree
Hide file tree
Showing 15 changed files with 362 additions and 130 deletions.
61 changes: 23 additions & 38 deletions arbitrator/Cargo.lock

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

2 changes: 1 addition & 1 deletion arbitrator/tools/wasmer
Submodule wasmer updated 580 files
14 changes: 1 addition & 13 deletions arbitrator/wasm-libraries/Cargo.lock

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

12 changes: 2 additions & 10 deletions cmd/conf/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package conf
import (
"fmt"
"runtime"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -106,7 +107,7 @@ func (c *InitConfig) Validate() error {
if c.Force && c.RecreateMissingStateFrom > 0 {
log.Warn("force init enabled, recreate-missing-state-from will have no effect")
}
if c.Latest != "" && !isAcceptedSnapshotKind(c.Latest) {
if c.Latest != "" && !slices.Contains(acceptedSnapshotKinds, c.Latest) {
return fmt.Errorf("invalid value for latest option: \"%s\" %s", c.Latest, acceptedSnapshotKindsStr)
}
if c.Prune != "" && c.PruneThreads <= 0 {
Expand Down Expand Up @@ -139,12 +140,3 @@ var (
acceptedSnapshotKinds = []string{"archive", "pruned", "genesis"}
acceptedSnapshotKindsStr = "(accepted values: \"" + strings.Join(acceptedSnapshotKinds, "\" | \"") + "\")"
)

func isAcceptedSnapshotKind(kind string) bool {
for _, valid := range acceptedSnapshotKinds {
if kind == valid {
return true
}
}
return false
}
Loading

0 comments on commit fd83c05

Please sign in to comment.