aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorDrake Burroughs <wildfyre@hotmail.com>2015-10-23 22:49:36 +0800
committerDrake Burroughs <wildfyre@hotmail.com>2015-10-29 01:46:39 +0800
commit05ea8926c32a97d9f193a69076037b7a704d6d92 (patch)
tree704b8897b7a0751fb6e7043bc8cc2baec923a496 /cmd
parent6b5a42a15ca54749d41c0b29b4a26ebb3a1a53f0 (diff)
downloaddexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.gz
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.bz2
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.lz
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.xz
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.zst
dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.zip
cmd/utils, crypto: add --lightkdf flag for lighter KDF
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/flags.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 79c86c52a..c2b92be46 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -157,6 +157,10 @@ var (
Name: "fast",
Usage: "Enables fast syncing through state downloads",
}
+ LightKDFFlag = cli.BoolFlag{
+ Name: "lightkdf",
+ Usage: "Reduce KDF memory & CPU usage at some expense of KDF strength",
+ }
// miner settings
// TODO: refactor CPU vs GPU mining flags
@@ -579,7 +583,13 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager {
if ctx.GlobalBool(TestNetFlag.Name) {
dataDir += "/testnet"
}
- ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore"))
+ scryptN := crypto.StandardScryptN
+ scryptP := crypto.StandardScryptP
+ if ctx.GlobalBool(LightKDFFlag.Name) {
+ scryptN = crypto.LightScryptN
+ scryptP = crypto.LightScryptP
+ }
+ ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore"), scryptN, scryptP)
return accounts.NewManager(ks)
}