Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testnet command with --node-dir-prefix panics #9373

Closed
4 tasks
greg-szabo opened this issue May 21, 2021 · 0 comments
Closed
4 tasks

testnet command with --node-dir-prefix panics #9373

greg-szabo opened this issue May 21, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@greg-szabo
Copy link
Member

Summary of Bug

The testnet command panics if the --node-dir-prefix contains a - (dash). --node-dir-prefix should accept -s because it's a valid character in folder names. However the testnet command also tries to create a "node-dir-prefixtoken" as an additional test token and tokens cannot have - in the names.

I'm pretty sure there are other restrictions for token names so I propose that the testnet command should simply add a "testtoken" as an extra token instead of trying to come up with clever names.

Version

4.2.1

Steps to Reproduce

$ gaiad testnet --chain-id something --keyring-backend test --node-dir-prefix ibc-0v -o . --node-daemon-home . --v 1
panic: invalid denom: ibc-0v0token

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/types.NewCoin(0xc0010d3af0, 0xc, 0xc0010cd0c0, 0x1, 0x1, 0xc0010d3af0)
	github.com/cosmos/[email protected]/types/coin.go:23 +0x8a
github.com/cosmos/gaia/v4/cmd/gaiad/cmd.InitTestnet(0x0, 0x0, 0x0, 0x0, 0x0, 0x57e41e7, 0xb, 0x5c4c520, 0xc000ee4930, 0x5c4fb80, ...)
	github.com/cosmos/gaia/v4/cmd/gaiad/cmd/testnet.go:201 +0xf5f
github.com/cosmos/gaia/v4/cmd/gaiad/cmd.testnetCmd.func1(0xc000f7ea00, 0xc000d3c540, 0x0, 0xc, 0x0, 0x0)
	github.com/cosmos/gaia/v4/cmd/gaiad/cmd/testnet.go:76 +0x528
github.com/spf13/cobra.(*Command).execute(0xc000f7ea00, 0xc000d3c480, 0xc, 0xc, 0xc000f7ea00, 0xc000d3c480)
	github.com/spf13/[email protected]/command.go:852 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000d37400, 0x0, 0x0, 0xc000ef64c0)
	github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/[email protected]/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc000d37400, 0xc000ef64c0, 0x11, 0x5c5ee80, 0xc000ee4930)
	github.com/cosmos/[email protected]/server/cmd/execute.go:36 +0x265
main.main()
	github.com/cosmos/gaia/v4/cmd/gaiad/main.go:16 +0x45

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants