From 09e7a936e46d2edb5f7c42914da33697a6aee955 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 14 Nov 2024 15:58:12 +0100 Subject: [PATCH 1/2] refactor(testnet): change alias and local-chains dir --- docs/docs/03-CLI-Commands/01-cli-commands.md | 2 +- ignite/cmd/testnet.go | 9 +++------ ignite/cmd/testnet_multi_node.go | 5 ++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/docs/03-CLI-Commands/01-cli-commands.md b/docs/docs/03-CLI-Commands/01-cli-commands.md index 48e5d30a64..b70e8d627b 100644 --- a/docs/docs/03-CLI-Commands/01-cli-commands.md +++ b/docs/docs/03-CLI-Commands/01-cli-commands.md @@ -3755,7 +3755,7 @@ Each validator's bonded stake can be adjusted according to your testing needs, p The multi-node command not only initializes these nodes but also gives you control over starting, stopping individual nodes. This level of control ensures you can test and iterate rapidly without needing to reinitialize the entire network each time a change is made. This makes it ideal for experimenting with validator behavior, network dynamics, and the impact of various configurations. -All initialized nodes will be stored under the `.ignite/local-chains//testnet/` directory, which allows easy access and management. +All initialized nodes will be stored under the `.ignite/local-chains//testnet/` directory, which allows easy access and management. Usage diff --git a/ignite/cmd/testnet.go b/ignite/cmd/testnet.go index 6574cf8e48..da91e7213a 100644 --- a/ignite/cmd/testnet.go +++ b/ignite/cmd/testnet.go @@ -7,12 +7,9 @@ import ( // NewTestnet returns a command that groups scaffolding related sub commands. func NewTestnet() *cobra.Command { c := &cobra.Command{ - Use: "testnet [command]", - Short: "Start a testnet local", - Long: `Start a testnet local - -`, - Aliases: []string{"s"}, + Use: "testnet [command]", + Short: "Start a testnet local", + Aliases: []string{"t"}, Args: cobra.ExactArgs(1), } diff --git a/ignite/cmd/testnet_multi_node.go b/ignite/cmd/testnet_multi_node.go index 7049005b0b..0f0ef96c51 100644 --- a/ignite/cmd/testnet_multi_node.go +++ b/ignite/cmd/testnet_multi_node.go @@ -2,6 +2,7 @@ package ignitecmd import ( "os" + "path" "strconv" "time" @@ -47,8 +48,6 @@ func NewTestnetMultiNode() *cobra.Command { Usage: ignite testnet multi-node [flags] - - `, Args: cobra.NoArgs, RunE: testnetMultiNodeHandler, @@ -108,7 +107,7 @@ func testnetMultiNode(cmd *cobra.Command, session *cliui.Session) error { } nodeDirPrefix, _ := cmd.Flags().GetString(flagNodeDirPrefix) - outputDir, err := xfilepath.Join(igcfg.DirPath, xfilepath.Path("local-chains/"+c.Name()+"d/"+"testnet/"))() + outputDir, err := xfilepath.Join(igcfg.DirPath, xfilepath.Path(path.Join("local-chains", c.Name(), "testnet")))() if err != nil { return err } From a2b82e61a863d3f1ee2a0af50c42e9cf532dc709 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 14 Nov 2024 17:12:04 +0100 Subject: [PATCH 2/2] `make lint-fix` --- ignite/pkg/cosmosutil/gentx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ignite/pkg/cosmosutil/gentx.go b/ignite/pkg/cosmosutil/gentx.go index 9ec7905dba..2d16b7e624 100644 --- a/ignite/pkg/cosmosutil/gentx.go +++ b/ignite/pkg/cosmosutil/gentx.go @@ -7,9 +7,10 @@ import ( sdkmath "cosmossdk.io/math" - "github.com/cometbft/cometbft/crypto/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cometbft/cometbft/crypto/ed25519" + "github.com/ignite/cli/v29/ignite/pkg/errors" )