swarm/api: add bzz prefix to swarm directory

This commit is contained in:
Felix Lange
2016-09-22 02:24:03 +02:00
parent cc0064b267
commit ef50e01c5e
2 changed files with 7 additions and 12 deletions

View File

@@ -59,9 +59,8 @@ type Config struct {
// config is agnostic to where private key is coming from
// so managing accounts is outside swarm and left to wrappers
func NewConfig(path string, contract common.Address, prvKey *ecdsa.PrivateKey) (self *Config, err error) {
address := crypto.PubkeyToAddress(prvKey.PublicKey) // default beneficiary address
dirpath := filepath.Join(path, common.Bytes2Hex(address.Bytes()))
dirpath := filepath.Join(path, "bzz-"+common.Bytes2Hex(address.Bytes()))
err = os.MkdirAll(dirpath, os.ModePerm)
if err != nil {
return