diff --git a/tests/e2e/initialization/config.go b/tests/e2e/initialization/config.go index a2f08e731..680e44015 100644 --- a/tests/e2e/initialization/config.go +++ b/tests/e2e/initialization/config.go @@ -267,7 +267,7 @@ func initGenesis(chain *internalChain, forkHeight int) error { // write the updated genesis file to each validator for _, val := range chain.nodes { - if err := util.WriteFile(filepath.Join(val.configDir(), "config", "genesis.json"), genesisJSON); err != nil { + if err := util.WritePublicFile(filepath.Join(val.configDir(), "config", "genesis.json"), genesisJSON); err != nil { return err } } diff --git a/tests/e2e/util/io.go b/tests/e2e/util/io.go index 8df59376d..84b8387b2 100644 --- a/tests/e2e/util/io.go +++ b/tests/e2e/util/io.go @@ -32,15 +32,6 @@ func CopyFile(src, dst string) (int64, error) { return nBytes, err } -func WriteFile(path string, body []byte) error { - _, err := os.Create(path) - if err != nil { - return err - } - - return os.WriteFile(path, body, 0o600) -} - func WritePublicFile(path string, body []byte) error { _, err := os.Create(path) if err != nil {