Updated tendermint cmn imports
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
tmsm "github.com/tendermint/tendermint/state"
|
||||
tmstore "github.com/tendermint/tendermint/store"
|
||||
@@ -43,8 +43,8 @@ func replayTxs(rootDir string) error {
|
||||
fmt.Fprintln(os.Stderr, "Copying rootdir over")
|
||||
oldRootDir := rootDir
|
||||
rootDir = oldRootDir + "_replay"
|
||||
if cmn.FileExists(rootDir) {
|
||||
cmn.Exit(fmt.Sprintf("temporary copy dir %v already exists", rootDir))
|
||||
if tmos.FileExists(rootDir) {
|
||||
tmos.Exit(fmt.Sprintf("temporary copy dir %v already exists", rootDir))
|
||||
}
|
||||
if err := cpm.Copy(oldRootDir, rootDir); err != nil {
|
||||
return err
|
||||
|
||||
@@ -14,7 +14,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
tmconfig "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
@@ -103,7 +104,7 @@ func InitTestnet(cmd *cobra.Command, config *tmconfig.Config, cdc *codec.Codec,
|
||||
nodeCLIHome, startingIPAddress string, numValidators int) error {
|
||||
|
||||
if chainID == "" {
|
||||
chainID = "chain-" + cmn.RandStr(6)
|
||||
chainID = "chain-" + tmrand.RandStr(6)
|
||||
}
|
||||
|
||||
monikers := make([]string, numValidators)
|
||||
@@ -352,12 +353,12 @@ func writeFile(name string, dir string, contents []byte) error {
|
||||
writePath := filepath.Join(dir)
|
||||
file := filepath.Join(writePath, name)
|
||||
|
||||
err := cmn.EnsureDir(writePath, 0700)
|
||||
err := tmos.EnsureDir(writePath, 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = cmn.WriteFile(file, contents, 0600)
|
||||
err = tmos.WriteFile(file, contents, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user