diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-01-24 17:49:20 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-13 20:00:02 +0800 |
commit | 833e4d1319336fbb66fd8f1e473c24472d65b17b (patch) | |
tree | 74d45d86d0c59c19f0ff67831f04e0cad9776eef /node/config.go | |
parent | 564b60520c68a1f06171abd705c01946b932492f (diff) | |
download | go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar.gz go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar.bz2 go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar.lz go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar.xz go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.tar.zst go-tangerine-833e4d1319336fbb66fd8f1e473c24472d65b17b.zip |
accounts, cmd, eth, internal, mobile, node: split account backends
Diffstat (limited to 'node/config.go')
-rw-r--r-- | node/config.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/node/config.go b/node/config.go index 8d75e441b..f3b4dcc73 100644 --- a/node/config.go +++ b/node/config.go @@ -27,6 +27,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/logger" @@ -401,11 +402,11 @@ func (c *Config) parsePersistentNodes(path string) []*discover.Node { } func makeAccountManager(conf *Config) (am *accounts.Manager, ephemeralKeystore string, err error) { - scryptN := accounts.StandardScryptN - scryptP := accounts.StandardScryptP + scryptN := keystore.StandardScryptN + scryptP := keystore.StandardScryptP if conf.UseLightweightKDF { - scryptN = accounts.LightScryptN - scryptP = accounts.LightScryptP + scryptN = keystore.LightScryptN + scryptP = keystore.LightScryptP } var keydir string @@ -431,6 +432,6 @@ func makeAccountManager(conf *Config) (am *accounts.Manager, ephemeralKeystore s if err := os.MkdirAll(keydir, 0700); err != nil { return nil, "", err } - - return accounts.NewManager(keydir, scryptN, scryptP), ephemeralKeystore, nil + ks := keystore.NewKeyStore(keydir, scryptN, scryptP) + return accounts.NewManager(ks), ephemeralKeystore, nil } |