From ce899a1015e8bab878c996e251e2aba385af6da8 Mon Sep 17 00:00:00 2001 From: rapha Date: Tue, 5 Mar 2024 16:14:45 +0100 Subject: [PATCH] feat: add search mode in kysor --- tools/kysor/cmd/start.go | 11 ++++++----- tools/kysor/cmd/valaccounts.go | 13 +++++++------ tools/kysor/go.mod | 2 +- tools/kysor/go.sum | 4 ++-- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/tools/kysor/cmd/start.go b/tools/kysor/cmd/start.go index 62d47089..cd8786b2 100644 --- a/tools/kysor/cmd/start.go +++ b/tools/kysor/cmd/start.go @@ -679,11 +679,12 @@ func validateVersionOrEmpty(s string) error { var ( flagStartValaccount = commoncmd.OptionFlag[config.ValaccountConfig]{ - Name: "valaccount", - Short: "v", - Usage: "Name of the valaccount to run", - Required: true, - MaxSelectionSize: 10, + Name: "valaccount", + Short: "v", + Usage: "Name of the valaccount to run", + Required: true, + MaxSelectionSize: 10, + StartInSearchMode: true, } flagStartEnvFile = commoncmd.StringFlag{ Name: "env-file", diff --git a/tools/kysor/cmd/valaccounts.go b/tools/kysor/cmd/valaccounts.go index 8f2c965e..8f48d42c 100644 --- a/tools/kysor/cmd/valaccounts.go +++ b/tools/kysor/cmd/valaccounts.go @@ -88,12 +88,13 @@ var ( }, } flagValaccCreatePool = commoncmd.OptionFlag[uint64]{ - Name: "pool", - Short: "p", - Usage: "The ID of the pool this valaccount should participate as a validator", - Required: true, - ValidateFn: commoncmd.ValidateInt, - MaxSelectionSize: 10, + Name: "pool", + Short: "p", + Usage: "The ID of the pool this valaccount should participate as a validator", + Required: true, + ValidateFn: commoncmd.ValidateInt, + MaxSelectionSize: 10, + StartInSearchMode: true, } flagValaccCreateStorageProvKey = commoncmd.StringFlag{ Name: "storage-priv", diff --git a/tools/kysor/go.mod b/tools/kysor/go.mod index d084fd46..3302eca9 100644 --- a/tools/kysor/go.mod +++ b/tools/kysor/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/KYVENetwork/chain v1.4.0 - github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240304152107-f836848d458c + github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240305150835-b68b9cb502bb github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-sdk v0.47.6 github.com/cosmos/go-bip39 v1.0.0 diff --git a/tools/kysor/go.sum b/tools/kysor/go.sum index b11d3a73..538c9b9b 100644 --- a/tools/kysor/go.sum +++ b/tools/kysor/go.sum @@ -241,8 +241,8 @@ github.com/KYVENetwork/chain v1.4.0 h1:i/1qgeyYL6LEwKkClXHgx0qjVxWfJtb1NVKqwOyhB github.com/KYVENetwork/chain v1.4.0/go.mod h1:7O6Avj5hdMyReTS5ykkYn9Vh4Ky8m2G4rwHPl9PyD+M= github.com/KYVENetwork/cosmos-sdk v0.47.6-kyve-rc0 h1:OoVLykPiZx3ecHY5lZH5TJmBBNADZYnvsNhH/nH8etA= github.com/KYVENetwork/cosmos-sdk v0.47.6-kyve-rc0/go.mod h1:xTc1chW8HyUWCfrgGbjS5jNu9RzlPVrBNfbL9RmZUio= -github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240304152107-f836848d458c h1:edvjfCmCNhX2VFs30v0nXxFSCDlD4PB2BNc9vyRMvH0= -github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240304152107-f836848d458c/go.mod h1:hTu1AKVJ06pSenOSnaA5CFR/t/Z4+T728JxbeRFYCRI= +github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240305150835-b68b9cb502bb h1:cGura2JOJo5OQA5N2j84XCI00xfVs8pjwtdCvLxMkjE= +github.com/KYVENetwork/kyve-rdk/common/goutils v0.0.0-20240305150835-b68b9cb502bb/go.mod h1:nVhkK8XUh27FooJtjsEdZc8Y7cYw0sy1lFUkHRAgc24= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=