forked from cerc-io/laconicd-deprecated
@@ -273,7 +273,7 @@ func New(t *testing.T, cfg Config) *Network {
|
||||
nodeDir := filepath.Join(network.BaseDir, nodeDirName, "ethermintd")
|
||||
gentxsDir := filepath.Join(network.BaseDir, "gentxs")
|
||||
|
||||
require.NoError(t, os.MkdirAll(filepath.Join(nodeDir, "config"), 0755))
|
||||
require.NoError(t, os.MkdirAll(filepath.Join(nodeDir, "config"), 0o755))
|
||||
|
||||
tmCfg.SetRoot(nodeDir)
|
||||
tmCfg.Moniker = nodeDirName
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
|
||||
package network_test
|
||||
|
||||
@@ -218,7 +218,6 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error {
|
||||
}
|
||||
|
||||
func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string) error {
|
||||
|
||||
// set the accounts in the genesis state
|
||||
var authGenState authtypes.GenesisState
|
||||
cfg.Codec.MustUnmarshalJSON(cfg.GenesisState[authtypes.ModuleName], &authGenState)
|
||||
@@ -265,14 +264,14 @@ func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalance
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeFile(name string, dir string, contents []byte) error {
|
||||
func writeFile(name, dir string, contents []byte) error {
|
||||
writePath := filepath.Join(dir)
|
||||
file := filepath.Join(writePath, name)
|
||||
|
||||
err := tmos.EnsureDir(writePath, 0755)
|
||||
err := tmos.EnsureDir(writePath, 0o755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return tmos.WriteFile(file, contents, 0644)
|
||||
return tmos.WriteFile(file, contents, 0o644)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user