feat: add rand funcs to math (#15043)

This commit is contained in:
Marko
2023-02-18 18:39:46 +00:00
committed by GitHub
parent 497dc2cb78
commit 2b484a241f
24 changed files with 188 additions and 36 deletions
+3 -4
View File
@@ -9,15 +9,14 @@ import (
"os"
"path/filepath"
"cosmossdk.io/math"
"cosmossdk.io/math/unsafe"
cmtconfig "github.com/cometbft/cometbft/config"
cmtrand "github.com/cometbft/cometbft/libs/rand"
"github.com/cometbft/cometbft/types"
cmttime "github.com/cometbft/cometbft/types/time"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"cosmossdk.io/math"
"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
@@ -209,7 +208,7 @@ func initTestnetFiles(
args initArgs,
) error {
if args.chainID == "" {
args.chainID = "chain-" + cmtrand.Str(6)
args.chainID = "chain-" + unsafe.Str(6)
}
nodeIDs := make([]string, args.numValidators)
valPubKeys := make([]cryptotypes.PubKey, args.numValidators)