Skip to content

Commit

Permalink
remove OperatorAddress and use normal accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
likesToEatFish committed Aug 16, 2024
1 parent 27d7fdd commit 2a19044
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 15 additions & 6 deletions ignite/cmd/testnet_inplace.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package ignitecmd

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ignite/cli/v29/ignite/pkg/cliui"
"github.com/ignite/cli/v29/ignite/services/chain"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -80,10 +82,17 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error {
if err != nil {
return err
}

var acc string
for _, i := range cfg.Accounts {
acc = acc + "," + i.Address
var operatorAddress sdk.ValAddress
var accounts string
for _, acc := range cfg.Accounts {
if cfg.Validators[0].Name == acc.Name {
accAddr, err := sdk.AccAddressFromBech32(acc.Address)
if err != nil {
return err
}
operatorAddress = sdk.ValAddress(accAddr)
}
accounts = accounts + "," + acc.Address
}

chainID, err := c.ID()
Expand All @@ -93,8 +102,8 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error {

args := chain.InplaceArgs{
NewChainID: chainID,
NewOperatorAddress: cfg.Validators[0].OperatorAddress,
AcountsToFund: acc,
NewOperatorAddress: operatorAddress.String(),
AcountsToFund: accounts,
}
return c.TestNetInPlace(cmd.Context(), args)
}
2 changes: 0 additions & 2 deletions ignite/config/chain/v1/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ type Validator struct {
// Name is the name of the validator.
Name string `yaml:"name" doc:"Name of the validator."`

OperatorAddress string `yaml:"operatoraddress" doc:"OperatorAddress of the validator."`

// Bonded is how much the validator has staked.
Bonded string `yaml:"bonded" doc:"Amount staked by the validator."`

Expand Down

0 comments on commit 2a19044

Please sign in to comment.