Skip to content

Commit

Permalink
Temporary files use ioutil.TempDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Immutability, LLC committed Dec 22, 2017
1 parent fad7d18 commit bced97d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ethereum/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@ import (
)

const (
PathTempDir string = "/tmp/"
ProtocolKeystore string = "keystore://"
MaxKeystoreSize int64 = 1024 // Just a heuristic to prevent reading stupid big files
RequestPathImport string = "import"
RequestPathAccounts string = "accounts"
)

func (b *backend) buildKeystoreURL(filename string) string {
return ProtocolKeystore + PathTempDir + filename
}

func (b *backend) writeTemporaryKeystoreFile(path string, filename string, data []byte) (string, error) {
keystorePath := path + "/" + filename
err := ioutil.WriteFile(keystorePath, data, 0644)
Expand Down

0 comments on commit bced97d

Please sign in to comment.