Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
likesToEatFish committed Sep 29, 2024
1 parent d492d08 commit 1fdea3e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
21 changes: 14 additions & 7 deletions ignite/cmd/testnet_multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,21 @@ func NewTestnetMultiNode() *cobra.Command {
stake: 200000000stake
- name: validator4
stake: 200000000stake
or
output-dir: ./.testchain-testnet/
chain-id: testchain-test-1
node-dir-prefix: validator
or random amount stake
....
multi-node:
random_validators:
count: 4
min_stake: 50000000stake
max_stake: 150000000stake
count: 4
min_stake: 50000000stake
max_stake: 150000000stake
output-dir: ./.testchain-testnet/
chain-id: testchain-test-1
node-dir-prefix: validator
`,
Args: cobra.NoArgs,
Expand Down Expand Up @@ -101,10 +109,9 @@ func testnetMultiNode(cmd *cobra.Command, session *cliui.Session) error {
ValidatorsStakeAmount: amountDetails,
OutputDir: cfg.MultiNode.OutputDir,
NumValidator: strconv.Itoa(numVal),
NodeDirPrefix: "validator", //node
NodeDirPrefix: cfg.MultiNode.NodeDirPrefix,
}

//initialized 3 node directories
//initialized numVal node directories
err = c.TestnetMultiNode(cmd.Context(), args)
if err != nil {
return err
Expand Down
3 changes: 2 additions & 1 deletion ignite/config/chain/base/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ type MultiNode struct {
Validators []ValidatorDetails `yaml:"validators" doc:"List of manually configured validators."`
RandomValidators RandomValidatorDetails `yaml:"random_validators" doc:"Configuration for randomly generated validators."`
OutputDir string `yaml:"output-dir" doc:"Directory to store initialization data for the testnet"`
ChainID string `yaml:"chain-id" doc:"Directory to store initialization data for the testnet"`
ChainID string `yaml:"chain-id" doc:"Chain id for the testnet"`
NodeDirPrefix string `yaml:"node-dir-prefix" doc:"Node directory prefix for the testnet"`
}

// GetVersion returns the config version.
Expand Down
3 changes: 2 additions & 1 deletion ignite/templates/app/files/config.yml.plush
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ multi-node:
min_stake: 50000000stake
max_stake: 150000000stake
output-dir: ./.<%= AppName %>-testnet/
chain-id: <%= AppName %>-test-1
chain-id: <%= AppName %>-test-1
node-dir-prefix: validator

0 comments on commit 1fdea3e

Please sign in to comment.