Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
likesToEatFish committed Sep 29, 2024
1 parent 4a7c50d commit 982e454
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions ignite/cmd/model/testnet_multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"syscall"

tea "github.com/charmbracelet/bubbletea"

"github.com/ignite/cli/v29/ignite/services/chain"
)

Expand Down
5 changes: 3 additions & 2 deletions ignite/cmd/testnet_multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"

tea "github.com/charmbracelet/bubbletea"

cmdmodel "github.com/ignite/cli/v29/ignite/cmd/model"
"github.com/ignite/cli/v29/ignite/config/chain/base"
"github.com/ignite/cli/v29/ignite/pkg/cliui"
Expand Down Expand Up @@ -148,10 +149,10 @@ func getValidatorAmountStake(cfg base.MultiNode) (int, string, error) {
stakeAmount := minS + rand.Uint64()%(maxS-minS+1)

Check failure on line 149 in ignite/cmd/testnet_multi_node.go

View workflow job for this annotation

GitHub Actions / Lint Go code

G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) (gosec)
if amounts == "" {
amounts = math.NewIntFromUint64(stakeAmount).String()
count += 1
count++
} else {
amounts = amounts + "," + math.NewIntFromUint64(stakeAmount).String()
count += 1
count++
}
}
} else {
Expand Down
7 changes: 4 additions & 3 deletions ignite/pkg/chaincmd/in-place-testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func (c ChainCmd) TestnetInPlaceCommand(newChainID, newOperatorAddress string, o

type MultiNodeOption func([]string) []string

func MultiNodeWithChainID(ChainId string) MultiNodeOption {
func MultiNodeWithChainID(chainId string) MultiNodeOption {
return func(s []string) []string {
if len(ChainId) > 0 {
return append(s, optionChainID, ChainId)
if len(chainId) > 0 {
return append(s, optionChainID, chainId)
}
return s
}
Expand All @@ -74,6 +74,7 @@ func MultiNodeWithNumValidator(numVal string) MultiNodeOption {
return s
}
}

func MultiNodeWithValidatorsStakeAmount(satkeAmounts string) MultiNodeOption {
return func(s []string) []string {
if len(satkeAmounts) > 0 {
Expand Down

0 comments on commit 982e454

Please sign in to comment.