aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-03-02 20:57:15 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:56:49 +0800
commit85e6c40c0081bd0db80448640db648887804010c (patch)
tree326a2c3bc115a445b481624cb20f00b28e44f92a /cmd/utils/flags.go
parentdff9b4246f3ef9e6c254b57eef6d0433809f16b9 (diff)
downloaddexon-85e6c40c0081bd0db80448640db648887804010c.tar
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.gz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.bz2
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.lz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.xz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.zst
dexon-85e6c40c0081bd0db80448640db648887804010c.zip
accounts, crypto: move keystore to package accounts
The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go19
1 files changed, 7 insertions, 12 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1d70245ab..c87c2f76e 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -551,20 +551,15 @@ func MakeDatabaseHandles() int {
// MakeAccountManager creates an account manager from set command line flags.
func MakeAccountManager(ctx *cli.Context) *accounts.Manager {
// Create the keystore crypto primitive, light if requested
- scryptN := crypto.StandardScryptN
- scryptP := crypto.StandardScryptP
-
+ scryptN := accounts.StandardScryptN
+ scryptP := accounts.StandardScryptP
if ctx.GlobalBool(LightKDFFlag.Name) {
- scryptN = crypto.LightScryptN
- scryptP = crypto.LightScryptP
+ scryptN = accounts.LightScryptN
+ scryptP = accounts.LightScryptP
}
- // Assemble an account manager using the configured datadir
- var (
- datadir = MustMakeDataDir(ctx)
- keystoredir = MakeKeyStoreDir(datadir, ctx)
- keystore = crypto.NewKeyStorePassphrase(keystoredir, scryptN, scryptP)
- )
- return accounts.NewManager(keystore)
+ datadir := MustMakeDataDir(ctx)
+ keydir := MakeKeyStoreDir(datadir, ctx)
+ return accounts.NewManager(keydir, scryptN, scryptP)
}
// MakeAddress converts an account specified directly as a hex encoded string or