diff options
author | Drake Burroughs <wildfyre@hotmail.com> | 2015-10-23 22:49:36 +0800 |
---|---|---|
committer | Drake Burroughs <wildfyre@hotmail.com> | 2015-10-29 01:46:39 +0800 |
commit | 05ea8926c32a97d9f193a69076037b7a704d6d92 (patch) | |
tree | 704b8897b7a0751fb6e7043bc8cc2baec923a496 /cmd | |
parent | 6b5a42a15ca54749d41c0b29b4a26ebb3a1a53f0 (diff) | |
download | dexon-05ea8926c32a97d9f193a69076037b7a704d6d92.tar.gz 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.go | 12 |
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) } |